How do I use my .pem file from Amazon EC2 with mosh?

To login with ssh I do this:

ssh -i ~/.ssh/kp1.pem

I tried all this with mosh:

mosh --ssh='ssh -i ~/.ssh/kp1.pem'

mosh -i ~/.ssh/kp1.pem

But I get the error:

/usr/bin/mosh: could not get canonical name for /home/$USER/.ssh/kp1.pem: Name or service not known
ssh_exchange_identification: Connection closed by remote host
/usr/bin/mosh: Did not find remote IP address (is SSH ProxyCommand disabled?).


Leave a Reply