mac-安装sshpass


 

id_rsa.pub路径:cat ~/.ssh/id_rsa.pub

在配置了ssh免密认证id_rsa.pub之后,在cmd终端可以实现免密登陆对应配置了密钥的服务器,但是在python程序中,想要调用cmd执行免密操作,还需要安装sshpass,sshpass用于非交互式的ssh密码验证

没有sshpass报错:to use the 'ssh' connection type with passwords, you must install the sshpass program

步骤:

1.在官网下载源码包

wget http://sourceforge.net/projects/sshpass/files/sshpass/1.05/sshpass-1.05.tar.gz 

2.解压

tar xvzf sshpass-1.05.tar.gz

3.进入解压文件

cd sshpass-1.05

4.检验环境

./configure

5.源码编译安装

make&&make install



免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM