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 [端口]
相关推荐
June bug2 小时前
【领域知识】广告全链路测试
macos·objective-c·cocoa
作孽就得先起床4 小时前
Xcode设置中文
macos
smileSunshineMan4 小时前
本地mac-openclaw安装
macos·openclaw
fish_study_csdn6 小时前
自己的mac 电脑上部署本地大模型
macos
绝世唐门三哥7 小时前
Mac 查看手机信息工具 + platform-tools 使用全指南
windows·macos
qinyia8 小时前
如何彻底卸载macOS上的conda并清理环境变量配置
macos·conda
0wioiw019 小时前
Onesignal(Xcode)
ide·macos·xcode
哈基米~南北绿豆1 天前
虚拟机体验:在Windows/Mac上运行鸿蒙PC开发环境
windows·macos·harmonyos
2601_949146531 天前
APP语音通知接口集成实战:移动端应用接入语音提醒API的开发手册
macos·objective-c·cocoa
小鹿软件办公1 天前
Apple 发布 macOS 11、watchOS 10 和 watchOS 9 更新
macos·objective-c·cocoa