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 [端口]
相关推荐
coding4u9 小时前
Mac 外接显示器完全指南:从插上线到调好每个参数
macos·计算机外设·文件管理·显示器·策略模式·quick look扩展
zhyf1199 小时前
(Mac)Homebrew部署Obsidian+Claudian+Excalidraw
macos
chuan.bai9 小时前
Java RAG 实战(第 3 篇):从交互式聊天到多轮上下文
java·人工智能·macos·ai
Chennn__10 小时前
开源项目:Recorder — 本地离线 macOS 录音转文字(通用/课堂/雅思,可选 Ollama)
macos
AUV110711 小时前
录系统声音用什么 Mac 录屏软件:双音源到成片的五层验收
macos
chuan.bai12 小时前
Java RAG 实战专栏导读:从零跑通 Ollama + Qdrant + Spring Boot 知识库
java·人工智能·macos·ai
向阳是我13 小时前
两台 Mac 远程共享屏幕最佳方案:Tailscale + macOS 原生屏幕共享
macos
楷哥爱开发14 小时前
如何在 Windows、macOS 和 Linux 上安装 scikit-learn (sklearn)
linux·windows·macos
Architect_Lee1 天前
mac快速安装mysql
数据库·mysql·macos
User_芊芊君子2 天前
STT + LLM + TTS:用一条流水线搓了个中英双向翻译助手
ide·macos·xcode