Putty method to realize automatic landing of remote Linux host _linux Shell

Source: Internet
Author: User
Tags touch ssh password protection

Because the work needs, often from the Windows host to access the remote Ubuntu server, each input account and the old password, feel very troublesome, so the reference online tutorial simple set up can automatically login remote host, very convenient.

Although Putty also provides puttygen.exe generate public/secret key, but and Linux host generated key format is different, need to manually modify the format, so the Linux host the way they generate the key.

First login to the Linux host, the specific process is as follows:

1. Generate public keys and keys

Copy Code code as follows:

verdana@hostname:~$ ssh-keygen-t RSA
Generating public/private RSA key pair.
Enter file in which to save the key (/HOME/VERDANA/.SSH/ID_RSA):
Enter passphrase (empty for no passphrase):
Enter same Passphrase again:
Your identification has been saved In/home/verdana/.ssh/id_rsa.
Your public key has been saved in/home/verdana/.ssh/id_rsa.pub.
The key fingerprint is:
51:51:DA:44:28:B5:83:DE:D2:1E:60:4F:81:C9:F1:1A verdana@hostname.com

Note Passphrase blank.

2. Append public key content to Authorized_keys

Copy Code code as follows:

# If Authorized_keys already exist, skip touch Create file This step
verdana@hostname:~/.ssh$ Touch Authorized_keys
verdana@hostname:~/.ssh$ Cat Id_rsa.pub >> Authorized_keys

3. Download the key and convert it to Putty recognizable format
Putty does not recognize the key generated by the Linux host, so it needs to be converted with Puttygen.exe.
A) Use FTP software or other means to copy the generated key ID_RSA to the client host, where my client is a Vista system
b) Open Puttygen.exe, click on the menu: Conversion-> Import key-> save key (such as: ID_RSA.PPK), the key is converted to complete, here is not set password protection

4. Set Putty

Open Putty
A) session, host name fill in: User@remote-host,user is your Linux host login name, Remote-host is the IP or remote host domain name, such as: Root@phpvim.net.
B Connect->ssh-> Authentication-> Browse, select the key (ID_RSA.PPK) that you just converted, and then save the session.

5. Use Cygwin?

If you are using a Cygwin SSH login remote server, simply copy the 3rd step generated key Id_rsa (no conversion required) to the Cygwin user's. SSH directory.

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.