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 [端口]
相关推荐
TO_ZRG38 分钟前
iOS 符号表文件概要
macos·ios·cocoa
默默在路上1 小时前
M芯片使用VMware Fusion安装CentOS Stream 9教程
linux·macos·centos
TheNextByte11 小时前
如何在Mac上收发Android信息 [2026 指南]
android·macos
耘田1 小时前
 macOS Launch Agent 定时任务实践指南
java·开发语言·macos
不爱吃糖的程序媛1 小时前
macOS 系统本地安装 openJiuwen 完整指南
macos
William.csj1 小时前
Mac——一款支持跨平台的与服务器之间的远程传输工具 FileZilla
macos·filezilla
Nightmare00419 小时前
Mac打开终端
macos
亚里随笔1 天前
vscode mac常用技巧—快捷键
ide·vscode·macos
Nightmare0041 天前
Mac 安装brew
大数据·macos
xiliuhu1 天前
Mac下使用conda安装PyTorch环境
pytorch·python·macos·conda