Server environment: Ali Server, Linux version-CentOS
Client environment: MAC OS X Terminal
In terminal with the SSH command login to the server each time to enter a password, although you can copy/paste the password, but after a period of time after the login does not operate, the server will automatically disconnect, the connection is also copied/pasted password, or some inconvenient.
Is there a way to achieve login without entering a password? There are ways to share this blog is the solution.
How does the server authenticate the client without entering a password? By certificate, a certificate is like a door card when you enter an office door. When the client logs on, the door card (certificate) is brushed on the server (certificate validation) and the server checks to see if the door card can open.
More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/Servers/cloud-computing/
How to make a door card, how to tell the server the door card information? Use the following procedure to answer this question.
1. Open the wallet where you put the door card
CD ~/.ssh/
If you don't have a wallet, go and buy one:
mkdir ~/.ssh
2. Make the door card
SSH-KEYGEN-T RSA
Default door card filename: id_rsa.pub
3. Copy a door card and put it into the server's wallet
SCP Id_rsa.pub username@server:~/.ssh/id_rsa.pub
Note: if the. ssh folder is not on the server, you need to log on to the server to create it.
4. Log in to the server (need to enter a password), take the card from the server wallet, remove the information, put it into a dedicated mezzanine
SSH Username@server
CD ~/.ssh cat id_rsa.pub >> Authorized_keys
5. Destroy the door card in the server wallet
RM id_rsa.pub
6. Exit Server
Exit
7. No need to enter password when you log in again
SSH Username@server
Welcome Houyi VM System!
[Root@aliyun-cnblogs ~]#
No password SSH login is so simple!