Putty method of implementing automatic login (SSH and SSH2) _linux shell

Source: Internet
Author: User
Tags file copy ssh
1, login to the host and enter ssh-keygen-t RSA
Prompt for enter file in which to save the key (/ROOT/.SSH/ID_RSA):
Input/root/.ssh/sea_rsa
Enter the relevant pathname and filename as prompted and generate two files (followed by two options to return directly)

2, put that did not. pub file copy out with Puttygen to generate Windows Putty available key (here refers to Sea_rsa, select Puttygen Conversions Import key (here refers to Sea_rsa, Then click Save Private Key)

3, the file with. Pub is renamed Authorized_keys and put into/root/.ssh/

4, start putty, set a good session of the parameters, and then choose from the left "Ssh->auth", click the Browse button, select the key file. Then select the session from the left and click the Save button to save the changes. Then click the Open button to sign in.
If the above operation is not a problem, then should be automatically logged in, just enter the user name without entering a password.
If you add a username to the data in connection, you don't have to enter the username.

Note: If you only use the SSH2 protocol, you need to modify the/etc/ssh/sshd_config file and add (or change): Protocol 2
Ls-l ' which ssh ' if it's ssh2.
Need to modify:
cd/root/.ssh2/
Touch Authorization (corresponds to Authorized_keys)
Content is:
Copy Code code as follows:

# Local Public key
Key id_rsa_1024_a.pub

The other steps are the same
Related Article

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.