Key-based SSH login with Nautilus' "Connect to Server"
I tried loggin into an SSH server via Nautilus' "Connect to Server" feature by just leaving the password blank, but that didn't work.
How do I connect to my server using the key I have on my system?
Instead of entering the username in the fields below, you'll have to prepend user@
to the server address and leave both username and password blank:
I needed to connect to EC2 instance using .pem key + connect using normal username-password mode. I solved these requirements by including the Host aliases in ~/.ssh/config
file. Example:
Host ssh_using_key
HostName abc.myawesomesite.com
User ubuntu
IdentityFile ~/.ssh/MyPrivateKey.pem
Compression yes
Host ssh_using_userpass
HostName 173.193.72.103
User root
Port 2222
Now as described above, go to File > Connect to Server in Nautilus. Example:
For SSH using Key:
Server = ssh_using_key (as in the ~/.ssh/config file)
Type = SSH
Folder = /var/www
[leave User Details BLANK.]
For SSH using Username and Password:
Server = ssh_using_userpass (as in the ~/.ssh/config file)
Port = 2222
Type = SSH
Folder = /home/www
User name = root
Password = lamepassword
Check Remember this password.
Please modify this according to your need. Hope this helps someone.