LOCALmachine = the computer that needs to “scp” to or from the REMOTE machine
REMOTEmachine = the computer that needs to give automatic access to the LOCAL machine
1. Generate on your LOCAL machine a keypair with: ssh-keygen -t rsa (dont type in any password, just keep hitting enter)
ssh-keygen-trsa
2. Copy content of the “~/.ssh/id_rsa.pub” file into the file “authorized_keys” (create if needed, otherwise add to end of the file) in the “/home/<usertoconnectas>/.ssh/” on the REMOTE machine which you want to automatically logon to. If you have to create the file, make sure that the user under whos .ssh folder it is, has rights to it
3. Make sure the authorized_keys on the REMOTE machine is not read or modifiable by group or others my doing chmod 700 /home/<usertoconnectas>/.ssh/authorized_keys
4. Make sure the .ssh directory on the REMOTE machine is not read or modifiable by group or others my doing chmod 700 /home/<usertoconnectas>/.ssh
5. Edit the “/etc/ssh/sshd_config” on the REMOTE machine and make sure the following is set:
PasswordAuthenticationyes
PermitEmptyPasswordsyes
6. Restart SSH Daemon on REMOTE machine with the following command: