Configure rsa login authentication for Linuxsshserver

Source: Internet
Author: User
Tags ssh server
The principle of configuring rsa login authentication in Linuxsshserver: The key is equivalent to a key, and the public key is equivalent to a door lock. of course, we use the key to unlock it. in the same way, we store the key on the local server, that is, client A, put the public key on the remote server, that is, the remote host B, then I...
Linux ssh server configures rsa login authentication principle: the key is equivalent to a key, and the public key is equivalent to a lock. of course, we use the key to unlock the key. in the same way, we put the key on the local server, that is, client A puts the public key on the remote server, that is, the remote host B, so we can log on to the remote host B from client A ssh without A password. www.2cto.com 1. generate the key [root@www.linuxidc.com. ssh] # ssh-keygen-t rsaGenerating public/private rsa key pair. enter file in which to save the key (/root /. ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in/root /. ssh/id_rsa.Your public key has been saved in/root /. ssh/id_rsa.pub.The key fingerprint is: e4: 9a: 47: a7: b4: 8a: 0b: 98: 07: b8: 70: de: 6b: 16: 2c: 0croot@www.linuxidc.com 2,/root /. ssh/id_rsa.pub is renamed as/root /. ssh/authorized_keys [a root@www.linuxidc.com. ssh] # mv/root /. ssh/id_rsa.pub/root /. ssh/authorized_keys 3. copy the private key id_rsa to the remote client 1) if the remote client is linux, copy it to the remote client/root /. ssh/secrets --> Conversions --> Import Key (2), select the copied private key file id_rsa (3), Save private Key-> id_rsa.ppk (Save the private key) http://service.ap-southeast-1.maxcompute.aliyun-inc.com/api) the following message is displayed after the open command is successfully opened: login as: rootAuthenticating with public key "imported-openssh-key". of course, you may encounter this error [because I encountered it, haha]: permissions 0755 for 'Your public key file path 'are too open. this is because these file permission settings are a bit problematic. execute the command: chmod 600. if your file ssh connection is slow, you can modify/etc/ssh/sshd_config, set GSSAPIAuthenticationno, and set UseDNS no, problem solving
 
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.