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 [端口]
相关推荐
雪域迷影1 小时前
MacOS中运行Next.js项目注册新用户时MongoDB报错MongoServerError
mongodb·macos·react·next.js
西京刀客4 小时前
macOS 打出来的 tar 包,Linux 常见告警(tar 包里带了 macOS 的扩展属性(xattr))
linux·运维·macos
码农垦荒笔记4 小时前
OpenClaw 实战 #02-1:新手一把过(原Clawdbot )保姆级安装教程-Mac版
人工智能·macos·openclaw
denggun123456 小时前
Material 和 Cupertino
macos·objective-c·cocoa
周杰伦_Jay8 小时前
【Mac 上命令行安装 Claude Code】(Claude 的终端版 AI 编程助手)完整指南
人工智能·macos·claude code
广拓科技8 小时前
微信历史版本含下载地址( Windows PC | 安卓 | MAC )及设置微信不更新
macos·微信
Art&Code8 小时前
M系列Mac保姆级教程:Clawdbot安装+API配置,30分钟解锁AI自动化!
运维·macos·自动化
「已注销」8 小时前
TradingView电脑版下载指南(Windows/Mac)
macos
冰冷的希望8 小时前
【系统】VMware17虚拟机安装黑苹果macOS 15.0详细步骤(保姆级)
macos·操作系统·系统·vmware·虚拟机·黑苹果
yuluo_YX8 小时前
Alias for Linux/Mac
linux·elasticsearch·macos