歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> sshpass+ssh自動填寫密碼連接

sshpass+ssh自動填寫密碼連接

日期:2017/3/1 17:09:11   编辑:關於Linux

sshpass+ssh自動填寫密碼連接 C代碼 sshpass -p 'password' ssh [email protected] # 可以把 密碼放到一個文件內(第一行?),然後 -f 參數 指定文件, www.2cto.com 內網開發測試的時候,可以用的上 sshpass 需要安裝, yum --enablerepo=remi install sshpass , 網上也有源碼包 客戶端 第一次ssh 連接的時候,必須輸入密碼,解決方法是 StrictHostKeyChecking no 加到/etc/ssh/sshconfig 可以讓ssh客戶端 自動接受新主機的host key,不用每次都自己輸入yes
Copyright © Linux教程網 All Rights Reserved