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 [端口]
相关推荐
jian110582 小时前
Mac 如何找到快捷键截屏被哪个程序设置使用的,
macos
水月天涯3 小时前
Mac系统下制作 Ubuntu镜像(小白教程)
linux·ubuntu·macos
习惯就好zz3 小时前
记一次 Mac SSH 免密登录 Windows 的踩坑与修复
windows·macos·ssh
utmhikari4 小时前
【DIY小记】解决MacOS上Edge浏览器bilibili全屏卡顿的问题
前端·macos·性能优化·edge·bilibili
派带星-4 小时前
基于 C++ 的第三方 SDK 封装实践(ASR + 短信服务)
c++·ide·macos
long_songs4 小时前
Python编程第02课:Windows/Mac/Linux环境安装配置详解
windows·python·macos
Lucas_coding5 小时前
【语音相关】Opus编码器生命周期管理:从“有噪音“到“无噪音“的完美转换 [opus, pcm 转化电流音问题解决]
macos·xcode·pcm
最贪吃的虎5 小时前
Mac安装Git教程
git·macos
2501_916008891 天前
iOS开发者工具有哪些?Xcode、Fastlane 与 kxapp 的组合使用
ide·vscode·macos·ios·个人开发·xcode·敏捷流程
June bug1 天前
(Mac)docling-mcp 的依赖解析器找不到匹配的 torch 安装包
经验分享·python·macos