Putty automatically logs on to a remote Linux host

Source: Internet
Author: User
Tags password protection
Article title: Putty automatically logs on to a remote Linux host. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Due to work requirements, it is often difficult to access remote Ubuntu servers from Windows hosts, therefore, you can use Putty to automatically log on to a remote Linux host by referring to the online tutorial, which is very convenient.

Although Putty also provides puttygen.exe to generate a public/KEY, the format of the KEY generated by the Linux host is different from that generated by the Linux host. Therefore, I use the Linux host to generate the KEY myself.

First, log on to the Linux host. the specific process is as follows:

1. generate the public key and key

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: leave passphrase empty.

2. change the public key to authorized_keys.

Verdana @ hostname :~ /. Ssh $ mv id_rsa.pub authorized_keys

3. download the private key and convert it to a recognizable format of Putty.

Putty cannot identify the private key generated by the Linux host, so you need to use puttygen.exe to convert it.

A) use FTP software or other methods to copy the generated id_rsa key to the client host. here, my client is the Vista system.

B) open puttygen.exe and click convert> Import key> save key (for example, id_rsa.ppk) on the menu. The key is converted completely. no password protection is set here.

4. set Putty

Open Putty

A) session, host name: yourname @ yourhost, yourname is your Linux host login name, yourhost is an IP address or remote host domain name.

B) connection-> SSH-> Authentication-> browse, select the converted key (id_rsa.ppk), and save the session.

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.