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 [端口]
相关推荐
DogDaoDao3 小时前
深入理解VideoToolbox:iOS/macOS视频硬编解码实战指南
macos·ios·音视频·实时音视频·视频编解码·videotoolbox·硬编码
归辞...18 小时前
「iOS」————自动释放池底层原理
macos·ios·cocoa
高克莱18 小时前
【macOS操作系统部署开源DeepSeek大模型,搭建Agent平台,构建私有化RAG知识库完整流程】
macos·llm·agent·知识库·anythingllm·ollama·deepseek
程序员果子18 小时前
macOS Python 安装
python·macos
Someone_sky1 天前
Daemon Tools for Mac —— 专业虚拟光驱与磁盘映像工具
macos
小指纹1 天前
cf--思维训练
c++·算法·macos·ios·objective-c·cocoa
小指纹1 天前
河南萌新联赛2025第(四)场【补题】
数据结构·c++·算法·macos·objective-c·cocoa·图论
光头才能变强2 天前
Mac安装WebStorm for Mac v2025.1.1
ide·macos·webstorm
ghostwritten2 天前
在 macOS 上 安装最新 Python 和 pip
python·macos·pip
Digitally2 天前
如何将照片从POCO手机传输到Mac电脑
macos·智能手机·电脑