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 [端口]
相关推荐
雾蓝回针7 小时前
[全网首发]解决Parallels Desktop运行“第五人格“时 使用涂鸦/快捷发言会导致视角偏移的问题
笔记·macos
这儿有一堆花14 小时前
视频文件的技术逻辑解析
windows·macos
Sheffi6617 小时前
iOS Crash 本质与捕获修复方案
macos·ios·cocoa
喵霓17 小时前
mac—android-platform-tools介绍
android·macos
malajisi0117 小时前
鸿蒙PC开发笔记一:HarmonyOS PC 命令行适配指南(Mac 版)
笔记·macos·harmonyos·harmony·鸿蒙pc·harmony pc
喵霓17 小时前
mac——安装wget
macos
bioinforiver17 小时前
蛋白质设计(六)— — 三剑合璧,mac如何安装ProteinMPNN、Alphafold2
macos
Charles Shan17 小时前
Mac上的linux虚拟机踩坑日记
linux·macos
老菜鸟YDZ18 小时前
二十多年前的苹果电脑Power Mac G4 MDD音箱修复
macos·苹果电脑·power mac g4·音箱修复
2301_7665360518 小时前
MacOS操作杂谈
macos