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 [端口]
相关推荐
zstar-_2 小时前
FreeTex v0.2.0:功能升级/支持Mac
人工智能·python·macos·llm
zeroporn15 小时前
在Mac M1/M2上使用Hugging Face Transformers进行中文文本分类(完整指南)
macos·分类·数据挖掘·nlp·transformer·预训练模型·文本分类
FreeBuf_15 小时前
CVE-2025-31258 macOS远程视图服务沙箱逃逸漏洞PoC已公开
macos
小宋加油啊15 小时前
Mac QT水平布局和垂直布局
开发语言·qt·macos
fanstering16 小时前
mac一键安装gpt-sovit教程中,homebrew卡住不动的问题
gpt·macos
上天_去_做颗惺星 EVE_BLUE16 小时前
Docker入门教程:常用命令与基础概念
linux·运维·macos·docker·容器·bash
深井冰水1 天前
mac M2能安装的虚拟机和linux系统系统
linux·macos
这是一个懒人1 天前
mac 快速安装stable diffusion webui
macos·stable diffusion
Eloudy1 天前
MacOS 上构建 gem5
linux·运维·macos
深井冰水2 天前
mac M2下虚拟机CentOS 8 安装上安装 Berkeley DB
数据库·macos·centos