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 [端口]
相关推荐
centor2 小时前
国际版 UnitySetup-Android-Support 安装 Mac 设备
android·macos
旭日跑马踏云飞2 小时前
【Mac】实用技巧-在新窗口中打开当前文件夹
macos
林疏safe4 小时前
CAD2026最新mac的安装教程收集免费分享
macos
Digitally4 小时前
如何高效安全地将 iPhone 与 Mac 同步
安全·macos·iphone
程序员允诺4 小时前
办公 WiFi 二次隔离下的远程桌面解决方案实践(Mac → Win11)
macos
hudawei9965 小时前
win和Mac在创建python虚拟环境,启动环境等操作的异同
windows·python·macos·虚拟环境
2501_916008895 小时前
没有 Mac 如何在 Windows 上创建 iOS 应用描述文件
android·macos·ios·小程序·uni-app·iphone·webview
提笔忘字的帝国15 小时前
【教程】macOS 如何完全卸载 Java 开发环境
java·开发语言·macos
数据雕塑家21 小时前
【网络故障排查实战】多台机器互ping异常:MAC地址冲突引发的网络“薛定谔猫“现象
网络·macos
TheNextByte11 天前
将照片从Mac传输到Android 7 种可行方法
android·macos·gitee