我是靠谱客的博主 霸气鸵鸟,这篇文章主要介绍快速配置ssh互信下载sshpass创建公钥和密钥本机localhost无密码登录修改/etc/hosts文件,写入所有节点名和ip使用sshpass复制到其它节点上,现在分享给大家,希望可以做个参考。
2019独角兽企业重金招聘Python工程师标准>>> 
下载sshpass
sshpass下载地址:http://sourceforge.net/projects/sshpass/ sshpass-1.06.tar.gz 在其中一台机器上安装sshpass
tar -zxvf sshpass-1.06.tar.gz
cd sshpass-1.06
yum install gcc openssl-devel readline-devel -y
./configure --prefix=/opt/sshpass
make && make install
cp /opt/sshpass/bin/sshpass /usr/bin/
创建公钥和密钥
ssh-keygen
本机localhost无密码登录
ssh-copy-id localhost
修改/etc/hosts文件,写入所有节点名和ip
vi /etc/hosts
使用sshpass复制到其它节点上
for i in $(seq -w 002 5);do sshpass -p dlw123 scp -o "StrictHostKeyChecking no" -r .ssh/ hadoop$i:~/;done
参考链接 安装sshpass
转载于:https://my.oschina.net/xiaozhublog/blog/1607426
最后
以上就是霸气鸵鸟最近收集整理的关于快速配置ssh互信下载sshpass创建公钥和密钥本机localhost无密码登录修改/etc/hosts文件,写入所有节点名和ip使用sshpass复制到其它节点上的全部内容,更多相关快速配置ssh互信下载sshpass创建公钥和密钥本机localhost无密码登录修改/etc/hosts文件内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复