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 [端口]
相关推荐
screenCui1 小时前
macOS运行python程序遇libiomp5.dylib库冲突错误解决方案
开发语言·python·macos
东东旭huster1 小时前
Mac自定义右键功能
macos
路先生的杂货铺7 小时前
mac m1芯片 安装pd及win10系统
macos
goodmao7 小时前
【macOS】【Swift】【RTF】黑色文字在macOS深色外观下看不清的解决方法
macos
liliangcsdn9 小时前
在mac m1基于llama.cpp运行deepseek
人工智能·macos·语言模型·llama
silence2509 小时前
macOS 上安装 Miniconda + Conda-Forge
macos·conda
sky丶Mamba9 小时前
CMD,PowerShell、Linux/MAC设置环境变量
linux·运维·macos
FreeBuf_21 小时前
原子级 macOS 信息窃取程序升级:新增后门实现持久化控制
macos·信息窃取
CHANG_THE_WORLD1 天前
「macOS 系统字体收集器 (C++17 实现)」
开发语言·c++·macos
小Lu的开源日常1 天前
在 macOS 上设置 SSH 和 Git
git·macos·ssh