Deploying an SSH certificate to enable Putty password-free login to Linux

Source: Internet
Author: User
Tags vps

Recently engaged in a VPS, with Putty landing every time to enter the root account password, more trouble, so the internet to find the SSH certificate method.

In fact, this should be the Putty recommended authentication method.

1. Generate the key using the Putty SSH key generation tool Puttygen.exe.
Generated key type and number of bits by default, SSH-2 rsa,1024 bit

Save the private key to local, you will be prompted to save the private key to set a password, no password more convenient.

2. Configure the Linux SSH login (root user, ~ is/root)
First log in to the remote Linux system and create the ~/.ssh/authorized_keys.

CD ~
mkdir ~/.ssh
VI ~/.ssh/authorized_keys
Paste the public key content generated by Puttygen.exe to ~/.ssh/authorized_keys.

As for why the file name is Authorized_keys, you can find the following two lines in the/etc/ssh/sshd_config
#PubkeyAuthentication Yes
#AuthorizedKeysFile. Ssh/authorized_keys

3. Log in to your Linux server with an SSH certificate/vps
putty→ session: Fill in the server IP
putty→ connection → Data: Fill in the automatic login user name (such as root)
putty→ Connection →ssh→ Authentication: Select Authentication private Key File
Back to putty→ session: Save the session, fill in a name to save it, next time directly double-click on the name to log in

4. For security you need to cancel the password authentication method of SSH.

This step can be done without doing, you can refer to the following links.

Reference Links:

Deploying an SSH certificate to enable Putty password-free login to Linux

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: 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.