SSH password-less Login

Source: Internet
Author: User

SSH password-less Login

0. Node

  • Gserver150 192.168.111.150
  • Gserver151 192.168.111.151
  • Gserver152 192.168.111.152
  • Gserver153 192.168.111.153

1. Execute the ssh-keygen-t rsa command on each node

$ Ssh-keygen-t rsa

In ~ /. Generate the key id_sa and id_rsa.pub under ssh

2. append the id_rsa.pub file on each node to the ~ of gserver150 ~ /. Ssh/authorized_keys

$ Cat ~ /. Ssh/id_rsa.pub | ssh geobeans@192.168.111.150 "cat-> ~ /. Ssh/authorized_keys"

The appended authorized_keys file is

3. Copy the authorized_keys file on gserver150 to 151 ~ 153 ~ /. Ssh directory

$ Scp geobeans@192.168.111.150 :~ /. Ssh/authorized_keys ~ /. Ssh/

4. Change the authorized_keys permission to 600

$ Chmod 600 ~ /. Ssh/authorized_keys

Complete ssh password-less login configuration. Log on to another node on any node, for example, log on to gserver151 from gserver150.

$ Ssh 192.168.111.151

Enter the password for the first login. You do not need to enter the password after logging on to gserver151.

Configure SSH password-less logon in CentOS

Implement SSH password-less authentication login in Linux

How to configure SSH for Ubuntu and CentOS to enable password-less Login

This article permanently updates the link address:

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.