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 [端口]
相关推荐
游戏开发爱好者811 分钟前
iOS 商店上架全流程解析 从工程准备到审核通过的系统化实践指南
android·macos·ios·小程序·uni-app·cocoa·iphone
_可乐无糖3 小时前
活到老学到老之yt-dlp_macos(二)
macos
hai-chu3 小时前
将 Neo4j 安装为 macOS 服务
macos·策略模式·neo4j
远程软件小帮手4 小时前
UU远程上线mac被控!如何远程控制 macOS 设备办公?
游戏·macos·智能手机·电脑
mini_0558 小时前
mac电脑免费使用Typora教程
macos
大牙Adela8 小时前
在Mac上通过Multipass虚拟机中的Ubuntu系统使用Graphviz工具
c语言·qt·ubuntu·macos·multipass·graphviz
z202305088 小时前
Linux之网络子系统-硬件MAC和 phy 的基本组成原理
macos
张志翔的博客12 小时前
如何在 macOS 上切换 Shell:从 Bash 到 Zsh 或其他 Shell
开发语言·macos·bash
2501_941798731 天前
C++高性能音频处理与实时特征提取实战分享:多线程信号处理与低延迟优化经验
ide·macos·xcode
星卯教育tony1 天前
Typora下载与Windows+Mac环境下使用教程
macos