在使用rsync远端rsync: Failed to exec ssh: No such错误

1、两台电脑之间使用rsync传输文件
10.41.1.78传输文件/etc/hosts至10.41.1.77的/mnt/
[root@backup ~]# rsync -avz /etc/hosts -e 'ssh -p 22' root@10.41.1.77:/mnt/
rsync: Failed to exec ssh: No such file or directory (2)
rsync error: error in IPC code (code 14) at pipe.c(84) [sender=3.0.6]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in IPC code (code 14) at io.c(600) [sender=3.0.6]
###检查原因结果是ssh客户端没有安装###
[root@backup mnt]# yum install openssh-clients -y
[root@backup mnt]# rsync -avz /etc/hosts -e 'ssh -p 22' root@10.41.1.77:/mnt/
The authenticity of host '10.41.1.77 (10.41.1.77)' can't be established.
RSA key fingerprint is 85:4f:56:9d:41:e2:fb:eb:88:e2:ba:ce:4e:5a:49:c4.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.41.1.77' (RSA) to the list of known hosts.
root@10.41.1.77's password:
bash: rsync: command not found
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: remote command not found (code 127) at io.c(600) [sender=3.0.6]
[root@backup mnt]# rpm -qa rsync
rsync-3.0.6-12.el6.x86_64
提示错误bash: rsync: command not found 经排查是目标计算机未安装rsync程序
客户端安装程序
[root@nfs01 mnt]# yum install rsync -y
重新传输
[root@backup mnt]# rsync -avz /etc/hosts -e 'ssh -p 22' root@10.41.1.77:/mnt/
root@10.41.1.77's password:
sending incremental file list
hosts

sent 196 bytes received 31 bytes 41.27 bytes/sec
total size is 309 speedup is 1.36
目标计算机查看是否传输成功
[root@nfs01 mnt]# ls
hosts
chuan传输成功

转载于:https://blog.51cto.com/11956937/2067602

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值