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 [端口]
相关推荐
ItisNagatoYuki4 小时前
Mac M芯片 RAG 极简流程 安装 ragflow + LM studio
macos
云攀登者-望正茂7 小时前
如何在mac上安装podman
macos·podman
江梦寻13 小时前
MacOS下Homebrew国内镜像加速指南(2025最新国内镜像加速)
开发语言·后端·python·macos·架构·策略模式
*Lisen13 小时前
重新安装解决mac vscode点击不能跳转问题
ide·vscode·macos
weixin_3875456421 小时前
如何把 Mac Finder 用得更顺手?——高效文件管理定制指南
macos
itme2681 天前
解决cocos 2dx/creator2.4在ios18下openURL无法调用的问题
macos·objective-c·cocoa
qq_279456151 天前
CADisplayLink、NSTimer、GCD定时器
macos·objective-c·cocoa
RR13351 天前
macOS 升级 bash 到最新版本
macos
我在北京coding1 天前
Tableau for mac 驱动
macos
檀越剑指大厂1 天前
【高效开发工具系列】Blackmagic Disk Speed Test for Mac:专业硬盘测速工具
macos