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 [端口]
相关推荐
Three~stone1 小时前
MacOS 各个版本相关镜像(dng和iso镜像文件)
macos
爱喝矿泉水的猛男2 小时前
如何测试鼠标是否支持mac mouse fix
macos·计算机外设
Navicat中国5 小时前
Navicat Premium MacOS:原生或通过 Rosetta 运行教程
数据库·macos·oracle·navicat·rosetta
Siyu_Zhu6 小时前
mac + server 完全一致的实验模板
macos
TESmart碲视6 小时前
KVM切换器支持高刷新率游戏吗?
游戏·macos·计算机外设·kvm切换器·双屏kvm切换器
爱喝矿泉水的猛男6 小时前
哪些鼠标不支持Mac mouse fix呢?
macos·计算机外设
ASKED_20191 天前
macOS 使用 Codex CLI 登录报错 403 的问题分析与解决方案(Issue #2414)
macos·issue
roo_11 天前
JAVA学习-MAC搭建java环境和spring boot搭建
java·学习·macos
Digitally1 天前
如何在 Mac 上进行屏幕录制(分步教程)
macos
2501_916008891 天前
在不越狱前提下导出 iOS 应用文件的过程,访问应用沙盒目录,获取真实数据
android·macos·ios·小程序·uni-app·cocoa·iphone