Every time you log on to the server, you have to enter your username and password, which is troublesome. Therefore, you may want to use a specified user to log on automatically. Collect the information on the Internet:
Tools:
Putty
Puttygen
Steps:
1. Use puttygen to generate an SSH2 RSA key and save the key file as authorized_keys;
2. Upload the content in "Public Key for pasting into authorized_keys file" in puttygen to the remote server ~ /. Ssh/authorized_keys file;
3. Set Putty:
Connection/ssh/auth/private key file for authentication Click Browse... select the authorized_keys file generated by puttygen just now;
Enter the logon username in connection/data/auto-login username;
Enter other settings, such as host name, and save the settings.
4. Click Open and the logon will be completed automatically.
The following describes how to automatically log on to the Linux server on the Linux client:
Steps:
1. Create a key
$ Ssh-keygen-T RSA
2. Copy the public key to the server.
$ SCP ~ /. Ssh/id_rsa.pub admin@192.168.0.101:. Ssh/authorized_keys
3. Add a private key
$ Ssh-add id_rsa
4. SSH connection
$ SSH admin@192.168.0.101.
Without a password, you can log on automatically.
Note: If you need to manage a lot of keys, for example, if you use putty + guttygen to log on automatically under XP, an authorized_keys file will be created. If you also need to log on with a key in Linux, you only need ~ The content of the/. Ssh/id_rsa.pub file is appended to ~ /. Ssh/authorized_keys file:
$ SCP ~ /. Ssh/id_rsa.pub admin@192.168.0.101:. Ssh/id_rsa.pub
$ Cat id_rsa.pub> authorized_keys
In this way, you can log on to two servers.