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 [端口]
相关推荐
2501_915921434 小时前
iOS开发环境搭建详解 Xcode 配置与快蝎轻量级工具选择
ide·vscode·macos·ios·个人开发·xcode·敏捷流程
JoyCong19986 小时前
为什么连接到被控后,客户端会自动锁定+出现锁屏界面?
macos·智能手机·电脑·远程工作·远程操作
芳草萋萋鹦鹉洲哦11 小时前
【git】重新生成并添加 SSH Key(Mac)
git·macos·ssh
2501_915918411 天前
详解iOS App上架至App Store的全流程步骤与注意事项
android·macos·ios·小程序·uni-app·cocoa·iphone
库奇噜啦呼1 天前
【iOS】weak底层实现
macos·ios·cocoa
2601_961593421 天前
视频分辨率太低?Topaz Video AI v1.6.0 让画质跃升
人工智能·macos·音视频
17715574311 天前
Mac 上 Ruby、gem、rvm、CocoaPods 四者关系通俗讲清楚
macos·ruby·cocoapods
Shell运维手记2 天前
交换机(二层交换机)完整工作原理
运维·网络·网络协议·macos·交换机
寒水馨2 天前
macOS下载、安装 Tailwind CSS-v4.3.3(附安装包tailwindcss-macos-arm64)
前端·css·macos·tailwind css·utility-first·css 框架·实用优先
寒水馨2 天前
macOS下载、安装neovim-v0.12.4(附安装包nvim-macos-arm64.tar.gz)
macos·vim·lua·文本编辑器·终端·lsp·neovim