How can I do the job of .ssh keys with mosh?
I'm looking at migrating from ssh + screen to mosh, and I was wondering what (if any) ways of using mosh can satisfy a use case of securely shelling in to a remote server without typing out credentials like a password. (If it matters, I am trying to use mosh from a Linux Mint VM.)
What (if any) is the standard mosh way to have hands-free authentication?
Thanks,
Mosh works on top of SSH. I used to log in using ssh public key authentication. I use ssh-agent to login:
$ ssh-add ~/.ssh/private_key
$ ssh [remote-server-ip]
When I switch to mosh, it's a matter of running
$ mosh [remote-server-ip]
You can still use any existing ssh commands with the --ssh
option. For example, without using ssh-agent my mosh command would be
$ mosh --ssh="ssh -i ~/.ssh/private_key" [remote-server-ip]