Set SSH automatic login (password-free, user name)

Source: Internet
Author: User
Set SSH automatic login (password-free, username) 1, create public key, public key ssh-keygen-t RSA ignore any hint that it comes out, cheerful all the way back to the end. 2. Copy the public key id_rsa.pub to the/HOME/USERNAME/.SSH directory of the remote machine and name it as Authorized_keys Method 1: One step in place: SCP ~/.ssh/id_rsa.pub [Email protected]:~ /.ssh/authorized_keys Method 2: Copy SCP ~/.ssh/id_rsa.pub [email protected]:~ login ssh [email protected] Append cat id_rsa.pub >&G  t;. ssh/authorized_keys all kinds of means, as you are happy, anyway, copy the past is more than one remote host on multiple replication ~ if you log on the user and remote login users in line with the same, you can directly ssh hostname directly landed, the following will not be seen. 3, to solve the local login user and remote login inconsistent Well, this thing is very tangled, although not to enter the password, but also ssh [email protected] to login, very uncomfortable, you understand. In fact, the solution is also very simple (but the colleague told me, Old face a red), modify the local login user's ~/.ssh/config file, if the wood has to build a bar, the content is as follows: Host hostname user Username host Hostname2 User UserName2 this way, the local and remote login usernames are inconsistent and can ssh hostname login. Call it

Set SSH automatic login (password-free, user name)

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.