On occasion I have the need to establish trust relationships between Unix boxes so that I can script file transfers. I will show you an example of setting up ssh from machine A to machine B
Connect to 'A' machine
type: ssh-keygen -t rsa
Give file name : E.g. temp_key and then look for temp_key.pub file in the same directory.
default directory for keyfiles will be ~/.ssh/
if you do not want to be prompted, leave passphrase blank
copy the contents of .ssh/id_rsa.pub / temp_key.pub (there should only be one line)
// Connect to 'B' box
place this line on 'B' box , in ~/.ssh/authorized_keys
that’s it, you should now be able to ssh/sftp/scp from A to B box without being prompted for a password!
No comments:
Post a Comment