This is a note for myself, hope that would be helpful for someone else.
You want to connect from your local ( Local ) to your cloud ( Cloud )
Below are steps to setup login for SSH without enter password:
1 - Generate SSH Private/Public key:
Use the below command to generate the RSA ssh key on your local
# ssh-keygen -t rsa
2 - View generated SSH Private/Public key:
The private/public key has been generated and stored at “/root/.ssh/”. Go to the corresponding directory and see the generated keys. See the output.
# cd /root/.ssh/
[root@2daygeek .ssh]# ll -h
-rw------- 1 root root 1.7K Dec 18 13:01 id_rsa
-rw-r--r-- 1 root root 419 Dec 18 13:01 id_rsa.pub
-rw-r--r-- 1 root root 1.6K Aug 23 08:15 known_hosts
3 - The id_rsa.pub key is below:
Use the below command to view the id_rsa.pub details
# cat id_rsa.pub
4 - Copy the public key to Cloud using ssh-copy-id:
# ssh-copy-id -i ~/.ssh/id_rsa.pub email@example.com
The authenticity of host '
(192.168.1.123)' can't be established.
RSA key fingerprint is 6f:ad:07:15:65:bf:54:a6:8c:5f:c4:3b:99:e5:2d:34.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.123' (RSA) to the list of known hosts.
Now try logging into the machine, with "ssh 'firstname.lastname@example.org'", and check in:
to make sure we haven't added extra keys that you weren't expecting.
The ssh-copy-id copy the id_rsa.pub key to remote server with name of authorized_key under “/root/.ssh/”.
5 - Try access Cloud server without Password
Now, you can access the remote host without entering password. like below
# ssh email@example.com
Last login: Wed Dec 18 13:00:57 2013 from 184.108.40.206
Hope you find it helpful, if you have any question, comment below