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 [端口]
相关推荐
花伤情犹在13 小时前
Mac上 10 分钟快速安装Hermes
macos·ai·agent·hermes
大码青年20 小时前
Pentaho Data Integration 完整安装指南 MacOS M5 - 最新版下载地址 pdi-ce-11
macos
专注VB编程开发20年1 天前
swift,object-c同名函数重载
macos·objective-c·cocoa
一个人旅程~1 天前
如何让bootcamp-win10中的触摸板像macbook中一样丝滑原生效果?
windows·经验分享·macos·电脑
欧阳天羲1 天前
AI智能水枪完整开发攻略
人工智能·macos·xcode
csdnor_011 天前
Hermes Desktop macOS 安装与排障教程
macos
一个人旅程~1 天前
MacBook Pro安装Win11 IoT LTSC 2024的两种方法操作说明
windows·经验分享·macos·电脑
cmdyu_2 天前
mac上如何卸载node.js
macos·node.js
黑化旺仔2 天前
【OC】PHPickerViewController
macos·objective-c·cocoa
AI行业学习2 天前
CC-Switch 下载、安装windows\macOS \Linux 安装
linux·运维·macos