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 [端口]
相关推荐
低调小一15 小时前
macOS 自带终端(Terminal.app)提效配置:最小工具链与工作流
macos
春波petal19 小时前
MacOS快速配置pnpm与切换淘宝镜像
macos·pnpm
Nefertari_YinC19 小时前
mac搭建基于wda\airtest 的iOS自动化测试环境
软件测试·macos·ios·airtest·ui自动化测试
ITKEY_19 小时前
macOS flutter开发环境之cocoapods
flutter·macos·cocoapods
吴佳浩 Alben19 小时前
OpenClaw macOS 完整安装与本地模型配置教程(实战版)
人工智能·macos
好运yoo19 小时前
mac 安装node提示 nvm install v14.21.3 failed可能存在问题
macos
2501_9151063220 小时前
iOS 应用打包流程,不用 Xcode 生成安装包
ide·vscode·macos·ios·个人开发·xcode·敏捷流程
Mumunu-20 小时前
Apple Silicon核心arm64 架构MAC部署openclaw
linux·运维·macos
小指纹20 小时前
2026牛客寒假算法基础集训营1
算法·macos·cocoa
还在忙碌的吴小二20 小时前
Mac 电脑安装qwen3.5:0.8b 有哪些方法
macos