ssh-keygen
to store the keys in a safe location so you can bypass the login prompt when connecting to your server.ssh-keygen
utility prompts you to indicate where to store the key.ssh-keygen
utility prompts you for a passphrase.id_rsa
file in the .ssh
directory and is used to verify the public key you use belongs to the same cloud server. It's important to never share your private key with anyone, it is equivalent of your password!id_rsa.pub
file and it is the key you'll upload to our cloud service. You can save this key to the clipboard by running this:ssh
command with username@ipaddress
as the argument:known_hosts
file and remove anylines that start with your cloud server’s IP address.nano
on Debian or theUbuntu operating systemor vi
on RPM or CENTOS servers. For simplicity, this article just uses nano
. If you prefer to use vi
,substitute vi
for nano
in the edit commands.For more on using nano
, seehttps://support.rackspace.com/how-to/modify-your-hosts-file/.[email protected]
inthe command.connection timeout
error, check the IP address thatyou used to ensure that it’s correct. You might also check theserver’s iptables to ensure that it isn’t blocking the port used by SSH.connection refused
error, you might be trying to useSSH with the wrong port. If you changed your server to listen to aport other than 22, use the -p
option with SSH to specifythe port.sshd
configuration to allow passwordconnections by setting PasswordAuthentication
to yes
. Restartthe server and try again. If you connect after these changes, thenthe issue is with the key and you must verify that the key is in theright place on the server.sshd
as the service name instead.