centos6.5配置ssh免秘钥登陆执行pssh命令的讲解
1.检查并安装pssh,yumlistpssh
2.因为没有配置免秘钥登陆,pssh命令执行失败。
[root@bogon]#pssh-Hroot@192.168.245.129-iuptime [1]11:00:36[FAILURE]root@192.168.245.129Exitedwitherrorcode255 Stderr:Theauthenticityofhost'192.168.245.129(192.168.245.129)'can'tbeestablished. RSAkeyfingerprintis84:2d:70:33:1c:45:fa:e6:4b:94:72:7e:10:98:7c:a8. Areyousureyouwanttocontinueconnecting(yes/no)? Hostkeyverificationfailed.
3.生成秘钥。
[root@bogontmp]#ssh-keygen-trsa Generatingpublic/privatersakeypair. Enterfileinwhichtosavethekey(/root/.ssh/id_rsa): Enterpassphrase(emptyfornopassphrase): Entersamepassphraseagain: Youridentificationhasbeensavedin/root/.ssh/id_rsa. Yourpublickeyhasbeensavedin/root/.ssh/id_rsa.pub. Thekeyfingerprintis: 9e:14:9a:cc:8d:9b:fd:51:c5:68:24:e1:ce:c6:d7:33root@bogon Thekey'srandomartimageis: +--[RSA2048]----+ |o..| |.oo| |..oo| |o==.o| |*S=oE| |*ooo| |o+.| |..| |.| +-----------------+
[root@bogon.ssh]#ll total8 -rw-------1rootroot1675Aug2211:06id_rsa -rw-r--r--1rootroot392Aug2211:06id_rsa.pub
4.拷贝到被管对象。
[root@bogon.ssh]#ssh-copy-id-i/root/.ssh/id_rsa.pubroot@192.168.245.129 Theauthenticityofhost'192.168.245.129(192.168.245.129)'can'tbeestablished. RSAkeyfingerprintis84:2d:70:33:1c:45:fa:e6:4b:94:72:7e:10:98:7c:a8. Areyousureyouwanttocontinueconnecting(yes/no)?yes Warning:Permanentlyadded'192.168.245.129'(RSA)tothelistofknownhosts. reversemappingcheckinggetaddrinfoforbogon[192.168.245.129]failed-POSSIBLEBREAK-INATTEMPT! root@192.168.245.129'spassword: Nowtryloggingintothemachine,with"ssh'root@192.168.245.129'",andcheckin: .ssh/authorized_keys tomakesurewehaven'taddedextrakeysthatyouweren'texpecting.
5.pssh命令执行成功。
[root@bogon.ssh]#pssh-Hroot@192.168.245.129-iuptime [1]11:10:39[SUCCESS]root@192.168.245.129 20:10:39up2:07,1user,loadaverage:0.00,0.00,0.00
总结
以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,谢谢大家对毛票票的支持。如果你想了解更多相关内容请查看下面相关链接
热门推荐
1 训练狗狗搜寻
2 如何训练狗狗装死
3 狗狗训练书
6 怎么训练狗狗拜年
8 狗狗训练游戏
10 狗狗嗅觉训练
11 怎么训练狗狗在笼子里不叫
12 怎么训练狗狗站立走路
13 怎么训练狗狗在马桶上
14 狗狗尿尿怎么训练
15 训练狗狗用品
16 泰迪狗狗的训练方法大小便
17 训练狗狗可以打吗
18 王曼丽的狗狗训练