ssh remote connection control linux passwords, keys connected

sshd service provides two security authentication methods:

Verify password-based security: Proven account number and password to log in to the remote host.

For security authentication key: the need to generate a "key" will transfer to the public service side, to compare the public key (relatively safe) locally.

First install ssh

Enter the command yum install openssh *

 

Enter the command rpm -qa | grep openssh if reality has the following three services then we do not need to install or uninstall ssh

 

 Then we open the file on the server folder part Change

Enter the command vim / etc / ssh / ssh_config

Change follows several places

 

 

 

 

 

 Restart the ssh service to take effect

Enter the command systemctl restart sshd

 

 

 Here we configure the keys in the client

First make sure the client and server can communicate

The client ping 192.168.39.100 (this is my server's IP)

 In the server ping 192.168.39.20 (this is my client's IP)

 

 

 

 At this time, if interworking, you may continue to operate

 

In the client configuration keys

Enter the command ssh-keygen

 

Then the server secret key transmitted to the client

Then you can enter the command ssh 192.168.39.100 remotely via an ssh connection service to both the

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/hjt123/p/11898182.html