Mac 手动安装 sshpass

1. 下载安装包

https://sourceforge.net/projects/sshpass/

解压并进入到安装包目录

sh 复制代码
tar -zxvf sshpass-xx.xx.tar.gz
cd sshpass-xx.xx

2. 检验环境,编译源码安装

sh 复制代码
./configure

make&&make install

3. 检测安装是否成功

sh 复制代码
▶ 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. 使用

sh 复制代码
sshpass -p [密码] ssh [用户名]@[服务器地址] -p [端口]
相关推荐
FreeBuf_3 小时前
苹果用户速更新!macOS存严重漏洞,用户隐私数据面临泄露风险
macos
Thomas21433 小时前
macos deepctr_torch虚拟环境配置
macos
wxl7812273 小时前
MacOS 运行CosyVoice
macos·cosyvoice·语音自然
lichong9514 小时前
【混合开发】vue+Android、iPhone、鸿蒙、win、macOS、Linux之video 的各种状态和生命周期调用说明
android·vue.js·macos
程序务虚论4 小时前
mac M1上安装windows虚拟机报错
windows·macos·parallels
今天头发还在吗7 小时前
【Go】:mac 环境下GoFrame安装开发工具 gf-cli——gf_darwin_arm64
macos·golang·go·gf-cli
小妖66610 小时前
MAC在home下新建文件夹报错“mkdir: test: Operation not supported”
macos
北冥有鱼被烹14 小时前
【问题解决】mac笔记本遇到鼠标无法点击键盘可响应处理办法?(Command+Option+P+R)
macos
Winter_Sun灬18 小时前
Mac开发第一步 - 安装Xcode
ide·macos·xcode
白玉cfc20 小时前
【iOS】push,pop和present,dismiss
macos·ios·cocoa