SSH Key Password-free authentication distribution, management, backup

Source: Internet
Author: User


Distribute:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/54/10/wKioL1R27jvhwlrgAADx5wmjMp0390.jpg "title=" QQ picture 20141127172350.png "alt=" Wkiol1r27jvhwlrgaadx5wmjmp0390.jpg "/>

A:

Ssh-keygen (generates a secret key with RSA or the-T DSA is generated with DSA)

Return

Ssh-copy-id-i.ssh/id_rsa.pub * * @Bssh-copy-id-i.ssh/id_rsa.pub **@c

After completion can be verified under

SSH **@b free-mssh **@c free-m


Backup:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/54/11/wKioL1R28ViztBIOAAEaUpeI40s109.jpg "title=" Qq20141127173711.jpg "alt=" Wkiol1r28viztbioaaeaupei40s109.jpg "/>


Z:

Ssh-copy-id-i. ssh/id_rsa.pub [Email protected] (you can also change the id_rsa.pub mv to Authorized_keys, but the former can directly modify the permissions permissions 600)
SCP. Ssh/id_rsa **@x:/home/**/.ssh/(sending the private key past) SCP. Ssh/id_rsa **@y:/home/**/.ssh/(sending the private key past)

Can be detected in XY:

SSH **@z free-m


Bulk Distribution:

A:

Vim fenfa.sh#!/bin/sh. /etc/init.d/functionsif [$#-ne 1];then echo "sh $ arg0" exit 1fi for IP in B Cdo scp-r-P $ **@ $IP: ~ >/d Ev/null 2>$1 #拷目录和保持属性 If [$?-eq 0];then action ' scp is OK '/bin/true else action "SCP is no"/ Bin/falsedone
Touch Test.logsh fenfa.sh Test.log


Batch management:

A:

Vim view.sh#!/bin/sh. /etc/init.d/functionsif [$#-ne 1];then echo "sh $ arg0" exit 1fi for IP in B Cdo echo "=====start=====" ss H **@ $ip echo "=====end=====" done
SH view.sh "Free-m"


SSH Key Password-free authentication distribution, management, backup

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.