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 [端口]
相关推荐
帅次6 小时前
Objective-C面向对象编程:类、对象、方法详解(保姆级教程)
flutter·macos·ios·objective-c·iphone·swift·safari
fengyun28917 小时前
Mac电脑 卸载工具 App Cleaner
macos
aerror11 小时前
Xbox One 控制器转换为 macOS HID 设备的工作原理分析
macos·xbox
晴风向上12 小时前
mac mini m4安装node.js@16以下版本方法
macos·node.js
JPCstorm13 小时前
Mac homebrew 安装教程
macos
秋窗713 小时前
Mac 部署Latex OCR并优化体验(打包成App并支持全局快捷键)
macos·ocr·latex
FreeBuf_14 小时前
朝鲜APT组织使用Nim语言恶意软件对macOS发起隐秘Web3与加密货币攻击
macos·web3·策略模式
Digitally18 小时前
如何将信息从 iPhone 同步到Mac(完整步骤和示意图)
macos·ios·iphone
fengyun289118 小时前
Mac电脑 虚拟机 VMware Fusion13
macos·mac·虚拟机
前端张三18 小时前
mac 电脑安装Homebrew来安装npm与node成功后,安装nvm的流程
前端·macos·npm