| Using SSH, SCP and RSYNC without a password |
|
|
|
| Wednesday, 15 November 2006 21:41 | |||
|
From time to time you want to write scripts that will allow you to copy files to or execute commands on remote systems. You want to execute these scripts without being prompted for a password and you don't want to store the password in the script file. To achieve this we can use ssh encryption keys.
Configure client: Log in as root (you can use another user though): # cd ~ # scp .ssh/id_dsa.pub root@server:/root/ Log in on the server If nescessary: Then continue: Log in to the client again. Use rsync to sync a directory. This copies all file in the tmp dir to the tmp dir on the remote host: -a archive
|