This topic describes the process for
password authentication in the sshd_config file and enabling
private/public key authentication to
ensure that private and public key authentication is enabled for your SSH server.
Open your SSH server configuration file in a text editor.
The configuration file is located in the following directory:
Ensure that PubkeyAuthentication yes has been added or
uncommented, and that PasswordAuthentication yes has been
commented out with a #.
The section should look like the following:
You must restart or reload the SSH server to apply your new settings.
Restarting or reloading your SSH server does not impact currently connected
To restart or reload your SSH server, use the following commands:
$ sudo service sshd restart
$ sudo service sshd reload
$ sudo /etc/init.d/ssh restart
$ sudo /etc/init.d/ssh reload
Private and public key authentication should now be enabled for your SSH server.