SUPPOSE CLIENT TRY TO CONNECT REMOTE SERVER. cd $HOME [or just type cd and then enter] the server HOME directory permission 750 chmod 700 .ssh cd .ssh # goto .ssh folder where below files exist To generate id_rsa.pub and id_rsa execute below command. Press enter
if it asks for anything [If id_rsa.pub already there no need to do this. ] ssh-keygen -t rsa chmod to below files on both servers. chmod 600 authorized_keys chmod 644 known_hosts chmod 640 id_rsa.pub chmod 600 id_rsa hostkey located in: /etc/ssh/ssh_host_rsa_key.pub To show fingerprint: ssh-keygen -l -f ssh_host_rsa_key.pub Append remote server's hostkey to client's(local) known_hosts file
with IP as below
[IP hostkey= comment_to_describe_key]: Append client server's(Local) id_rsa.pub key to remote server's authorized_keys as below.
ssh-rsa key= comment_to_describe_key
Now connect to remote servers as below example: ssh email@example.com It should not prompt you any password
NOTE-- There may be slight changes from OS to OS as in some OS keys been copied automatically.