The server is ready to work:
1. Log in to the server to modify the sshd configuration file
VI /etc/ssh/sshd_config
Find the following uncomment #
Rsaauthentication Yes pubkeyauthentication Yes authorizedkeysfile. SSH
2. If you modify the configuration file, you need to restart the SSHD service
Native configuration:
1. Generate public and private keys
The default is to generate two files in the ~/.ssh directory:
2. Import the public key authentication file
Cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
3. Copy the public key to the server
4. Import the public key into a serious file (on the server)
Cat/home/id_rsa.pub >> ~/.ssh/authorized_keys
5. Server Modification Permissions
chmod ~/.ssh chmod ~/.ssh/authorized_keys
6. Modify the configuration file under Mac for this quarter ~/.ssh/config
192.168.11.11~/.ssh/id_rsa
7. Terminal execution SSH test link remote server
Use iterm2 ssh password-free login under Mac