Monday, August 15, 2016

Passwordless SSH login

I created this to remind myself how I did it.

First I disabled password authentication so no password login can be made possible. Just edit the file "/etc/ssh/sshd_config" then set the "PasswordAuthentication" to "no".

Don't forget to restart the ssh service.
For Debian - service ssh restart
For CentOS/Fedora - service sshd restart

Add yourself to the sudoers file. Command to edit it...
# visudo
Then add yourself. Example is below
# User privilege specification
root    ALL=(ALL:ALL) ALL
[your username]  ALL=(ALL:ALL) ALL

No comments: