How to Enable/Disable Password Login in Unix (Ubuntu) via Command Line

Edit the ssh config file using your preferred editor I am going to install vim. You will need root access to do this operation.

vim /etc/ssh/sshd_config

Then find the line with PasswordAuthentication and change the line as below

PasswordAuthentication yes

If you want to turn off the password authentication then you can just commented out the whole line (as the password authentication is off by default) or you can set

PasswordAuthentication no

After you finish editing you can save the file then restart the `ssh` service using the command

service sshd restart


Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *