Logging in to the server with a certificate

  

I recently found openssl and found that the certificate is safe. Then on the Internet, I found out how to log in to the Linux server with a certificate.

1 Switch to your own directory

cd ~

2 New .ssh directory has . The directory is hidden, you can see the ls -al parameter

mkdir .ssh

3 into

cd .ssh

4 the following is a version of the generated certificate xshell








5

vi authorized_keys

6 to copy the entire contents copied to FIG authorized_keys directory under .ssh Here.

7 Save

wq

8 Open the /etc/ssh/sshd_config file

vi /etc/ssh/sshd_config

9 Search/PasswordAuthentication Change PasswordAuthentication yes to PasswordAuthentication no Disable password login. Of course you can also change the password and certificate together.

10 wq Save and exit

11 Restart the sshd service and then Yes

service sshd restart

Copyright © Windows knowledge All Rights Reserved