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 [端口]
相关推荐
kingbal10 小时前
MAC:chatgpt登陆报错签名异常
macos·chatgpt
k4m7v2pz10 小时前
macOS 窗口最小化:三种写法的实测对比与可复用脚本
macos·窗口管理·截屏·applescript·bevy·ai自动化
witton3 天前
MacOS中在目录或者文件右键菜单中添加“使用VSCode打开”
vscode·macos·文件·目录·服务·automator·右键菜单
山外有山a3 天前
【实战】M系列芯片Mac本地部署Qwen2.5:Ollama + Open WebUI 全流程与3个关键优化参数
macos
思盛iOS签名上架3 天前
App苹果签名有什么作用?
macos·ios·cocoa
MartinYeung53 天前
[论文学习]MAC:多智能体宪章学习
人工智能·学习·macos
greasyfork3 天前
Mac Sketch v2026.3 矢量图设计工具
macos·ui·sketch
无定义_4 天前
萌新联赛(六)
macos·objective-c·cocoa
风安•辛幸4 天前
mac上微信最新v4以上版客户端多开教程,亲测可用
macos·微信
weixin_531670894 天前
Interlude起来:动作动画和文字通知哪个更适合休息提醒?Mac上有没有用桌宠做动作引导的软件?
人工智能·macos·mac·swift