SSH login on linux remote server password free

Source: Internet
Author: User

When the local client SSH to the remote server, each time you enter a user name and password, if you do not want to enter the password every time you can use the following actions.

First, the local client input Ssh-keygen

[Email protected] ~]$Ssh-keygenGenerating Public/private RSA key pair. Enterfile inch whichTo save the key (/home/keysystem/.SSH/id_rsa): Created directory'/home/keysystem/.ssh'. Enter Passphrase (Empty forno passphrase): Enter same passphrase Again:your identification has been savedinch/home/keysystem/.SSH/Id_rsa. Your public key has been savedinch/home/keysystem/.SSH/id_rsa.pub.The Key fingerprint is:af:a4:d5:4d: the: 3c: -: in: EA:Panax Notoginseng: -: 0c:Wuyi: 3b:ba:2b [email protected]the key's Randomart image is:+--[RSA2048]----+| .  +o.           || + O.          || O.         =  || . + + .        || S.  X.         ||        o = = | |       o o O | | + .   E.      || .  .    .. |+-----------------+[[Email protected]~]$

To generate a public private key pair, you can enter into the ~/.SSH directory to view the generated public private key pair.

[Email protected] ~]$ CD ~/. ssh/[[email protected]. SSH] $ ll-81 keysystem keysystem  413 Dec  4:12  id_rsa.pub11675 Dec  4:  id_ Rsa[[email protected]. SSH

Then execute ssh-copy-id [email protected], where Dzy is the user name of the remote host and 172.20.16.42 the IP address of the remote server.

ssh-copy-ID [email protected]172.20. 14.42

SSH login on linux remote server password free

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.