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 [端口]
相关推荐
Lvan的前端笔记5 小时前
python:Mac 系统 uv 完整安装+入门实战
python·macos·uv
pop_xiaoli7 小时前
【iOS】离屏渲染
macos·ios·objective-c·cocoa
colman wang2 天前
Git指令(Mac)
git·macos
酷虎软件3 天前
分享链接+视频音频文案提取 API 接口文档
ide·macos·xcode
Hyyy3 天前
为什么 macOS 应用一换 Bundle ID,之前授予的权限就全失效了?
macos·electron
p似笑非笑3 天前
实战验证——把 SDK 塞进一个 macOS 原生 Agent 应用
macos
p似笑非笑3 天前
在Mac上完美配置VSCode的C/C++开发环境(GCC/G++详细教程)
c语言·vscode·macos
韦胖漫谈IT3 天前
Apple M3 Max 与 Apple M5 Max 对比:本地算力的新旧王者之争
网络·人工智能·macos·transformer
greasyfork4 天前
多种数据库管理混乱?Navicat Premium 17 for Mac 统一解决
数据库·mysql·macos·mac
碎_浪4 天前
Mac 壁纸被 MDM 锁住?我做了个 2MB 的开源方案
macos·开源·swift