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 [端口]
相关推荐
1024小神6 小时前
Mac 副屏快速左 50% 分屏
macos
菜鸟歪歪歪11 小时前
idea中增加api中转站教程(Mac,Window通用)
macos·intellij-idea
小石潭记丶1 天前
本地mac创建秘钥,然后远程登录Linux服务器
linux·服务器·macos
小呀小叮当~1 天前
OpenAI Codex 桌面版(Windows / macOS)体验分享:AI 编程效率再次提升
人工智能·windows·macos
myenjoy_11 天前
I2S 音频与数字音频接口详解
macos·音视频·xcode
星野爱8952 天前
崩坏星穹铁道4.4版本即将前瞻!Mac畅玩PC端开荒新版本
macos
funnycoffee1232 天前
lacp报文占多少字节?报文的目的mac
网络·网络协议·macos
itwangyang5202 天前
Claude Code macOS 安装完整指南:Homebrew、原生脚本与常见问题解决
macos
汤姆yu3 天前
macOS系统下Aider完整安装、配置与实战使用教程
大数据·人工智能·算法·macos·github·copilot
码云数智-园园3 天前
SwiftUI 6 生产落地踩坑实录
macos·objective-c·cocoa