1. 程式人生 > >在使用rsync遠端rsync: Failed to exec ssh: No such錯誤

在使用rsync遠端rsync: Failed to exec ssh: No such錯誤

提示 1.2 received ssh incr war 客戶 臺電 ive

1、兩臺電腦之間使用rsync傳輸文件
10.41.1.78傳輸文件/etc/hosts至10.41.1.77的/mnt/
[root@backup ~]# rsync -avz /etc/hosts -e ‘ssh -p 22‘ [email protected]:/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‘ [email protected]:/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.
[email protected]‘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‘ [email protected]:/mnt/
[email protected]‘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傳輸成功

在使用rsync遠端rsync: Failed to exec ssh: No such錯誤