Putty + guttygen for automatic remote Logon (including Linux client + server)

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.