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 [端口]
相关推荐
GeofferyLibrom3 小时前
# Mac 平台 Chiaki-ng 配置指南: Base64 ID 获取
macos·base64·chiaki-ng·npsso·psnawp
GeofferyLibrom3 小时前
PS5 自动化挂机指南:基于 Mac + Chiaki-ng 视觉识别——龙信2自动挂机实战
运维·macos·自动化
月月如常3 小时前
Typora 粘贴图片时 PicGo 弹窗的解决方案
macos·typora·picgo
andyweike3 小时前
CGRect
macos·objective-c·cocoa
疯狂敲代码的老刘3 小时前
DigUp:2.8千星开源Mac语义搜索,Google DeepMind模型本机运行找遍所有文件
macos
anthonyzhu4 小时前
xcode27适配iOS27多窗口生成机制处理的问题
macos·objective-c·cocoa
TheLittleBoy5 小时前
iOS 27支持的设备列表
macos·ios·cocoa·ios 27
李永吉6 小时前
mac软件安装包pkg公证装订处理去掉安全拦截弹窗
macos
朝阳5811 天前
Mac 上找窗口,可以先按这几种情况来
macos
william_yangshun1 天前
DigUp 实测:用多模态嵌入做 macOS 全盘语义搜索
macos·向量检索