mitten
is a drop-in replacement for SSH that brings internet connection
to the machines without it, and enables easy file transfer between the local
and remote machines.
Only you can use the connection and have the access to the local files.
Normally, on machines with no internet access, calls like these fail or hang:
$ ssh supercomp
supercomp> curl -I https://unkaktus.art
curl: (7) Failed to connect to unkaktus.art port 443: Network is unreachable
With mitten
, they work through your local connection:
$ mitten supercomp
▗▟▀▀▙
▗▛ ▐▌
▗▟▘ ▗▛
▗▄▄▟▀ ▀▀▀▀▀▀▀▜▄
█ █ ▝▜▖
█ █ mitten ▙
█ █ magic! ▗▌
▜▄▄█▄ ▗▟▀
▀▀▀▀▄▄▄▄▄▄▄▀▀
supercomp> curl -I https://unkaktus.art
HTTP/1.1 308 Permanent Redirect
Mitten magic!
To easily transfer files between the local machine and the remote,
use mittenfs
command after logging in, which provides sftp
interface:
$ mitten supercomp
supercomp> mittenfs
supercomp> sftp> get local_file.dat .
supercomp> sftp> lls
local_file.dat
Mitten magic!
- Download and install the binary for your platform. For example, for Linux on AMD64:
curl -L -o mitten https://github.com/unkaktus/mitten/releases/latest/download/mitten-linux-amd64
mkdir -p ~/bin
mv mitten ~/bin/
chmod +x ~/bin/mitten
Add $HOME/bin into your $PATH into your .bashrc:
export PATH="$HOME/bin:$PATH"
-
Install Go (https://go.dev,
brew install go
,conda install go
) -
Build
mitten
:
go install github.com/unkaktus/mitten@latest
- Add
$HOME/go/bin
to your$PATH
:
export PATH="$HOME/go/bin:$PATH"
You would probably want to have it permanently, so put it into your shellrc.