1. 下载安装包
https://sourceforge.net/projects/sshpass/
文章来源:https://www.toymoban.com/news/detail-696506.html
解压并进入到安装包目录文章来源地址https://www.toymoban.com/news/detail-696506.html
tar -zxvf sshpass-xx.xx.tar.gz
cd sshpass-xx.xx
2. 检验环境,编译源码安装
./configure
make&&make install
3. 检测安装是否成功
▶ sshpass
Usage: sshpass [-f|-d|-p|-e] [-hV] command parameters
-f filename Take password to use from file
-d number Use number as file descriptor for getting password
-p password Provide password as argument (security unwise)
-e Password is passed as env-var "SSHPASS"
With no parameters - password will be taken from stdin
-P prompt Which string should sshpass search for to detect a password prompt
-v Be verbose about what you're doing
-h Show help (this screen)
-V Print version information
At most one of -f, -d, -p or -e should be used
4. 使用
sshpass -p [密码] ssh [用户名]@[服务器地址] -p [端口]
到了这里,关于Mac 手动安装 sshpass的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!