SSH Connection between the linux hosts
Hello folks,
Here I would like to give steps to build a SSH connection between two Linux hosts.
Example hosts: abc.com & xyz.com
- Login to abc.com
- Navigate to "$cd .ssh/" directory from root. Incase the directory is not available simply create it in root "/".
- Execute the following command "ssh-keygen -t rsa"
- Change the permissions to "id_rsa.pub" file "chmod 600 id_rsa.pub"
- Do cat id_rsa.pub and copy the content.
- Create "authorized_keys" file in same directory. Do vi and paste the content. If file is already exist paste the content at bottom of the file.
- Create "authorized_keys" file in .ssh/ directory in remote host (xyz.com). Do vi and paste the content.
- Perform steps 1 to 6 in remote host (xyz.com) and copy the content in "id_rsa.pub" and paste it in "authorized_keys" file in remote host(abc.com).
- Execute the following command to check the SSH connection.
- Login to abc.com
- $ssh xyz.com (First time it will ask password to login xyz.com)
- Execute same command in xyz.com to check ssh connection to abc.com.
Hope this post will useful.
Feel free to post your comments if you any question regarding this…
Cheers!!!
Comments
Post a Comment