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 [端口]
相关推荐
猿小猴子12 小时前
在 MacOS Tahoe 上使用VMware虚拟机安装 ARM版 Windows11
macos·vmware·win11 for arm
feiyangqingyun12 小时前
Qt项目作品在苹果macos上编译运行效果/视频监控系统/物联网平台等
开发语言·qt·macos
彩旗工作室13 小时前
将iOS/macOS应用上架至App Store
macos·ios·应用商店·appstore
新***袭15 小时前
如何在 Mac 上恢复已删除的文件(包括清空了垃圾箱方法)
macos
江东小bug王15 小时前
深入解析 iOS 与 macOS 应用程序生命周期(完整指南)
macos·ios
xingxing_F16 小时前
DSync for Mac 文件对比同步工具
macos
2501_9160088919 小时前
iOS 发布全流程详解,从开发到上架的流程与跨平台使用 开心上架 发布实战
android·macos·ios·小程序·uni-app·cocoa·iphone
xingxing_F1 天前
Swift Publisher for Mac 版面设计和编辑工具
开发语言·macos·swift
CHH32131 天前
在 Mac/linux 的 VSCode 中使用Remote-SSH远程连接 Windows
linux·windows·vscode·macos