i need to connect(sftp) from serverA to serverB via rsa algorithm. But i can not success this.
i did like that:
On ServerA:
#ssh-keygen -t rsa
after running this command, "id_rsa" and "id_rsa.pub" files were generated. i checked.there is private key in id_rsa file and public key in id_rsa.pub file.
#ssh user@serverB mkdir -p .ssh
i checked that on serverB .ssh directory was generated.
#cat .ssh/id_rsa.pub | ssh user@serverB 'cat >> .ssh/authorized_keys'
i checked that public key had been sent to authorized_keys file which is in .ssh directory,serverB
but when i want to connect from serverA to serverB like that
on server A it asked me password:( i dont understand why
i gave all files 640 permissions.
But when i write on ServerA:
sfpt user@serverB
Connecting to ServerB
The authenticity of host ServerB' can't be established.
RSA key fingerprint is 81:6a:2c:3a:54:39:51:26:b7:96:86:6e:e9:bf:ac:bb.
Are you sure you want to continue connecting (yes/no)?
i wrote yes and i can log in to serverB.
i quited and try again, still it asked me password.
Arent there any other way to connect from one server to another server without password ?
Besides the files in .ssh, make sure your home dir and the .ssh dir don't have write permissions except for the owner. Also check /etc/ssh/sshd_config on the server to see if it has