2
在CentOS版本6.3(最終)系統上工作。並嘗試通過ssh使用sshpass
實用另一臺機器就像無法在centOS中運行sshpass命令
sshpass -p 'password' ssh [email protected]
但它給我的錯誤,如
sshpass: Failed to run command: No such file or directory
所以從錯誤我認爲sshpass
可能無法安裝等都曾嘗試通過yum install sshpass
安裝它,得到以下日誌
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirror.leapswitch.com
* epel: epel.mirror.net.in
* extras: mirror.leapswitch.com
* nux-libreoffice.org-rpms: mirror.li.nux.ro
* updates: mirror.leapswitch.com
Setting up Install Process
Package sshpass-1.05-1.el6.i686 already installed and latest version
Nothing to do
從上面看來sshpass已經安裝了。所以爲什麼它不工作?
謝謝,使用'which sshpass'我得到了路徑'/usr/bin/sshpass'.so它可以工作,但是上面的路徑需要導出意味着它的默認路徑。 –
您可能沒有安裝ssh客戶端 「which ssh」的輸出是什麼? 如果它爲空,則需要安裝ssh客戶端。 – kiran
輸出是/ usr/bin/ssh。表示已經安裝 –