Linux

SSH without password

machineA has userA
machineB has userB
We will automate the connection from A to B

On machineA

ssh-keygen -t rsa
Don't enter a passphrase

cat .ssh/id_rsa.pub
Copy the output lines

On machineB

cd
mkdir -p .ssh
Open your favorite text editor (e.g. vi, emacs) and put the text copied on machineA in a file called ~/.ssh/authorized_keys. If the file already exist, just add the copied information on a new line at the end of the current file. Save and exit your text editor.

On machineA

ssh userB@machineB

rsync with different computers

machineA has userA
machineB has userB
We will tranfer files from A to B

rsync -avz --stats -e ssh userA@machineA:/home/userA/DIR/ -e ssh userB@machineB:/home/userB/DIR/
Voila!
If only one machine is remote, you can remove "-e ssh userX@machineX:"

References

linuxproblem.org




Back to the main site