-
Notifications
You must be signed in to change notification settings - Fork 0
SSH Connection with No Password
Christopher Hopkins edited this page Dec 23, 2013
·
9 revisions
Useful if you frequently connect to a remote machine using ssh.
- SSH server running on remote machine (Obvious)
- ssh client on you local machine
$ ssh-keygen -t rsa
You will be prompted to enter a filename and password (both can be left default/blank).
$ scp .ssh/id_rsa.pub username@remote_machine:remote_pub_key
This will copy the key from the local machine to the home directory of the user on the remote machine.
Login to the remote machine and use the following command:
$ cat remote_pub_key >> .ssh/authorized_keys
$ ssh user@remote_machine
If it does not work, there may be some changes on the remote server.
-
You may need to change the permissions on the 'authorized_keys' file on the remote_machine:
$ chmod 640 authorized_keys