Password-free logon and SSH Password Logon in SSH

Source: Internet
Author: User
Tags free ssh

Password-free logon and SSH Password Logon in SSH

1: Execute the command ssh-keygen rsa to generate the key, located in ~ /. Ssh folder (if there is any prompt during this period, press enter all the way and do not enter anything)

2: run the command cp ~ /. Ssh/id_rsa.pub ~ /. Ssh/authorized_keys. If yes/no is displayed, enter yes.

Verify ssh localhost.


How to implement secure password-free ssh Login

Home ?? Blogs ?? Jianing Yang's blog Submitted by Jianing Yang on Fri, SSH password-free O & M background ssh implements encrypted remote login. however, as a system administrator, frequent Password Input often breaks down when many machines need to be operated. fortunately, you have read this article and it will show you how to implement secure and convenient password-free ssh login. to create an ssh public/private key, you must first discard the Password Logon method, because that method is too messy. next we will start to use a public/private key authentication method for ssh login. the simple explanation of the "Public/Private Key" authentication method is that you need to create a pair of public/private keys and then put the public keys on the server. Keep the private key yourself when logging on to the server through ssh, the ssh program will send a private key to match the public key on the server. if the match is successful, we can log on to the system. Now we have two machines: qian.jianingy.com (this is our server, actually it is mine), nby. jian Ingy.com (this is my notebook). First, use the ssh-keygen program to create a public/private key pair in the notebook to generate a public/private key jianingy @ nby :~ $ Ssh-keygen

Ssh password-free settings

Set the. ssh directory to 700 and have the execution permission.
Set authorized_keys to 600. Otherwise, an error occurs.
For example
Ssh root @ localhost

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.