Use putty to log on to Linux

Source: Internet
Author: User
Tags openssh server
Using putty to log on to Linuxputty with a certificate is a small and free remote connection tool in windows, which is favored by administrators. However, putty cannot record passwords, which makes many people feel uncomfortable. Of course, there is a serious security risk in the password record, but you cannot deny it... using putty to log on to Linux putty with a certificate is a small and free remote connection tool in windows, which is favored by administrators. However, putty cannot record passwords, which makes many people feel uncomfortable. Of course, there is a serious security risk in the password record, but there is no denying that it is much easier to use automatic logon. In fact, remote logon to Linux is another method that is more convenient than logging a password, that is, using certificates to log on to linux. certificates are widely used in Linux shell, and putty also supports this method. Download puttygen.exeonly rely on the local putty.exe can not achieve the certificate login, we must download the supporting certificate generation tool. On the official website of putty, you can download puttygen.exe generate certificate to open puttygen.exe, select SSH-2 RSA encryption mode at the bottom, click generate, the public key and private key pair will be generated, during the generation process, you need to move the cursor back and forth in the blank area of the progress bar to generate a random number. Click save private key to save the private key. the private key is basically the same as the password. you need to save it properly. if it is lost, it cannot be found. In this interface, passphrase is required to be entered, which is equivalent to adding a password to the private key and adding a security layer. However, passphrase must be entered when the private key is used at the first time when the private key is started, you can set it as needed. The text box named public key to pasting into OpenSSH authorized_keys file appears in the mouse shaking area, the text in is the public key used for Linux OpenSSH server verification. Upload The public key to Linux and log on to linux normally to check whether the current user directory exists. whether there is an authorized_keys file in the ssh folder. If not, use the following command to create and set the mkdir ~ permission ~ /. Sshtouch ~ /. Ssh/authorized_keyschmod 700 ~ /. Ssh then run the command cat >> ~ /. Ssh/authorized_keys, the screen will stop, paste the generated public key into the window, and press Ctrl-D to end the input. In this way, you can add the public key to the authentication file of Linux. You can use cat ~ /. Ssh/authorized_keys. Configure putty and log on to open putty. in Connection-> SSH-> Auth's Private key file for authentication option, select the Private key file you just saved. Enter the username required for logon in Connection-> Data-> Auto-login username and log on again. then, you can use the certificate to log on automatically. If you want to configure the second linux server but forget to save the public key, the public key can be automatically generated using the private key. Open puttygen.exe, click load, and select the private key file. then the public key is generated.
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.