Title: Use ssh and scp without password
Author: Sandro Tosi
Last modified: 2005-07-24
Take this situation: a laptop needs to communicate (transfer files,
login, etc.) with a workstation using ssh (or scp, which is based on
ssh). Because this is a frequent action, why not eliminate the
password request all the times?
Attention: this is a security flaw, because stoling the laptop, anyone
will be able to log into the workstation without password.
Go to the laptop, and with the user you'll use type this command:
<laptop>$ ssh-keygen -t rsa
the passphrase is not needed so you cannot set it.
Then copy from the laptop the file $HOME/.ssh/id_rsa.pub to the
workstation renaming it to authorized_keys:
<laptop>$ scp ~/.ssh/id_rsa.pub user@workstation:~/.ssh/authorized_keys
if the file authorized_keys already exists, do not overwrite it, but
append the file from the laptop to this:
<laptop>$ scp ~/.ssh/id_rsa.pub user@workstation:~/.ssh/temp_file
<ws>$ cd ~/.ssh/ ; cat temp_file >> authorized_keys ; rm temp_file
Hopefully, now you can connect to the workstation without any
If you're not able to do so, the first thing to check is into the
configuration file of ssh daemon in the workstation the presence of