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 [端口]
相关推荐
我是Superman丶6 小时前
Arduino IDE 安装教程:Windows/macOS/Linux 开发环境搭建
ide·windows·macos
k4m7v2pz7 小时前
Mac 上用 brew 安装 UTM 与 QEMU(代理配置全记录)
macos
千码君201611 小时前
提词器项目V1.0功能分析
ide·macos·xcode
承渊政道13 小时前
星空组网真实体验:Mac远程访问Ubuntu,SSH与HTTP全流程验证
ubuntu·http·macos·ssh·服务器管理·星空组网
深念Y14 小时前
黑苹果P400-直通显示折腾全记录-20260907
macos·ios·系统·黑苹果·苹果·英伟达·p400
DevLoom_17 小时前
MacBook 256GB到底够不够用,日常怎么清理空间?
macos·mac空间清理·mac磁盘空间不足
编程的一拳超人1 天前
DeepSeek Harness Linux/macOS/Windows 本地下载、启动与模型配置指南
linux·windows·macos·deepseek
时凌云.1 天前
【2026最新】JDK 下载安装与环境配置全教程(Windows/Mac/Linux 三平台,零基础友好)
java·linux·macos
HackTwoHub1 天前
BurpSuite2026.8专业(稳定版)下载Windows/Linux/Mac支持Java21以上(新增Burp AT智能体)
linux·运维·服务器·安全·macos·网络安全·自动化
海鸥两三1 天前
Mac电脑使用 Tabby 部署前端项目到阿里云服务器完整教程
前端·macos·阿里云