SSH with passwordless

step 1

$ ssh-keygen 2048 -t rsa -f output-file-name

step 2 to another server

$ ssh [email protected] "mkdir .ssh/"
$ scp -r publickey.pub [email protected]:~/.ssh
$ ssh [email protected] "cat ~/.ssh/publickey.pub >> ~/.ssh/authorize_key"

เก็บ private ไว้
** เราใช้ private ในการ เข้าระบบ

step 3 Edit /etc/ssh/sshd_config

$ vi /etc/ssh/sshd_config
change from
#PasswordAuthentication yes
to
PasswordAuthentication no

Reboot

May 25, 2020