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 [端口]
相关推荐
fthux1 小时前
Tick Rest,一个休息提醒工具的自我修养
macos·开源·swift
FPGA小迷弟1 天前
FPGA 与千兆以太网:各类物理接口的形式、区别、使用方法与应用场景详解
tcp/ip·macos·fpga开发·udp·fpga
周小董3 天前
[1379]mac安装nvm
macos
bossjuemfc3 天前
不记得文件名时,Mac 上的搜索还能怎么做?
macos
2501_915909063 天前
Windows 打开 Xcode 工程,编译调试 Xcode 项目并和 Mac 同事协作
ide·windows·vscode·macos·ios·个人开发·xcode
请为小H留灯4 天前
Mac 常用操作与维护技巧
macos·电脑·清理电脑·常用技巧
hantmac4 天前
不记得文件名时,Mac 上的搜索还能怎么做?
人工智能·macos
这是谁的博客?4 天前
AI 加速器 RTL 数字系统设计深度解析:从 MAC 阵列 Verilog 实现到时序收敛与时钟功耗的芯片落地全链路
人工智能·macos·ai·verilog·数字ic设计·ai芯片·rtl
slacker-kian4 天前
M 系列 Mac 清除顽固的 CorpLink
macos·corplink·m系列
kk_net88994 天前
FSNotes:macOS 和 iOS 上的开源笔记管理器
笔记·其他·macos·ios