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 [端口]
相关推荐
吃鱼的灰太狼1 小时前
Mac本地部署大模型|Ollama+Gemma4/Qwen3.5新手零失败教程,彻底告别Token消耗✨
macos
代码的小搬运工1 小时前
Masonry学习
学习·macos·cocoa
yangSnowy1 小时前
mac系统安装hyperf框架swoole扩展
后端·macos·swoole
EVE จุ๊บ21 小时前
如何修改mac上的jmeter堆内存
jmeter·macos
老蒋每日coding1 天前
Node.js 安装指南(Mac 版本)
macos·node.js
AI玫瑰助手1 天前
Python入门:Windows/macOS/Linux系统安装Python教程
windows·python·macos
智算菩萨1 天前
OpenAI Codex 国内使用完全指南:Windows/macOS/Linux 三平台详细安装配置教程(现在最新的有gpt-5.3-codex和gpt-5.4)
linux·windows·gpt·macos·ai·ai编程·codex
AAI机器之心1 天前
在 macOS 上本地部署 Ollama + LLaMA3(附教程)
人工智能·macos·langchain·llm·知识库·大模型部署
HSTK1 天前
Mac上配置PlatformIO
macos
于慨2 天前
firecrawl
macos