#SSH Login without password
- Create public and private keys using ssh-keygen on local-host
$ ssh-keygen
or
# Creates a new ssh key, using the provided email as a label
$ ssh-keygen -t rsa -C "your_email@example.com"
-
Copy the public key to remote-host using ssh-copy-id
$ cat ~/.ssh/id_rsa.pub | ssh USER@REMOTE-HOST "mkdir -p ~/.ssh; cat >> ~/.ssh/authorized_keys"
-
Login to remote-host without entering the password
$ ssh USER@REMOTE-HOST