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 [端口]
相关推荐
sysinside16 小时前
如何创建可引导的 macOS Golden Gate 27 安装介质
macos
Dr.Buho20 小时前
macOS 27 升级教程:兼容机型、三种安装方法与降级提示
经验分享·macos
sysinside21 小时前
macOS Golden Gate 27.0 (26A428) 正式版 Boot ISO 原版可引导映像下载
macos
黑科技iOS上架2 天前
Cocos应用App Store4.3被拒怎么自查
macos·ios·objective-c·cocoa·审核·ios混淆·cocos混淆
典典分享指南2 天前
AI 配图的排版规范
macos·docker·github·vim·visual studio
:-)3 天前
修改mac电脑用户名
macos
Είναι η κοπέλα3 天前
本地大模型部署完全指南:Ollama / vLLM / llama.cpp / MLX 四大引擎横评与选型实战
macos·llama·vllm
那年窗外下的雪.3 天前
AIDC 学习日志|第 25 天|设备输出反推、MAC Flapping 与 EAD 撤销
前端·网络·git·学习·macos
星辰即远方3 天前
RunLoop初步了解
macos·objective-c·cocoa
代码的小搬运工3 天前
Runloop
macos·objective-c·cocoa