SSH in most system by default allow public key authentication. This means that you can use your public and private key pair to log in to a server via
You can disable
SSH public key authentication on the server side if your private key has been has been compromised or for any other reason by configuring
SSHd configuration file at the terminal.
Disable public key authentication in SSH:
SSHdconfiguration file with your favourite text editor.
$ sudo vi /etc/ssh/sshd_config [sudo] password for user:
PubkeyAuthenticationand set the option to
Add the line if it doesn't already exist and remove the
# at the beginning of the line if exists.
$ sudo systemctl restart sshd
|Red Hat Enterprise Linux|
|SUSE Linux Enterprise Server|