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 [端口]
相关推荐
javaGHui19 小时前
macOS 上获取调试版
macos
2501_915918411 天前
iOS描述文件功能解析
android·macos·ios·小程序·uni-app·cocoa·iphone
2501_915918412 天前
iOS 上架应用市场全流程指南,App Store 审核机制、证书管理与跨平台免 Mac 上传发布方案(含开心上架实战)
android·macos·ios·小程序·uni-app·cocoa·iphone
darkb1rd2 天前
MacCalendar:专为 Mac 用户打造的高效日历工具
macos
神秘剑客_CN3 天前
MacOS学习笔记
笔记·学习·macos
数据饕餮3 天前
faster-whisper热词详解与程序设计
ide·macos·xcode
javaGHui3 天前
mac 安装 jdk17
macos·jdk
___波子 Pro Max.3 天前
Mac电脑解决sudo密码问题方法
macos
2501_938963963 天前
Flutter 3.19 桌面应用开发:适配 Windows/macOS 端窗口大小与菜单栏自定义
windows·flutter·macos
可乐大数据3 天前
macOS 一键免密登录阿里云 ECS:SSH 密钥对认证完整指南
macos·阿里云·ssh