Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6547171
  • 博文数量: 1005
  • 博客积分: 8199
  • 博客等级: 中将
  • 技术积分: 13071
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-25 20:19
个人简介

脚踏实地、勇往直前!

文章分类

全部博文(1005)

文章存档

2020年(2)

2019年(93)

2018年(208)

2017年(81)

2016年(49)

2015年(50)

2014年(170)

2013年(52)

2012年(177)

2011年(93)

2010年(30)

分类: LINUX

2019-03-14 15:48:41

部署sshpass
1.下载
wget -O sshpass.tar.gz

2.编译安装
tar -zxvf sshpass.tar.gz
cd sshpass-1.06
./configure
make
make install


3.使用
/opt/sshpass-1.06/sshpass -p oracle scp /home/oracle/soft/sshpass.tar.gz oracle@192.168.1.1:/home/oracle/script/
/opt/sshpass-1.06/sshpass -p oracle ssh oracle@192.168.1.1 -o StrictHostKeyChecking=no "/home/oracle/script/get_df.sh" 2>/dev/null


问题:
报如下错误,需要安装gcc
[root@localhost sshpass-1.06]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/tmp/sshpass-1.06':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
解决办法:
[root@localhost sshpass-1.06]# yum install gcc

问题2:
[root@lenovo ~]# ssh root@192.168.1.21
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:qdaqNv1/Aoy17uW+KnGdNwRKGl1UNLejMSe5r7R08lc.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending RSA key in /root/.ssh/known_hosts:11
RSA host key for 192.168.1.21 has changed and you have requested strict checking.
Host key verification failed.
编辑如下文件,删除相应的条目
[root@lenovo ~]# vi ~/.ssh/known_hosts



阅读(5482) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~