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 [端口]
相关推荐
liliangcsdn41 分钟前
smolagents - 如何在mac用agents做简单算术题
人工智能·macos·prompt
名字不要太长 像我这样就好2 小时前
【iOS】继承链
macos·ios·cocoa
潜龙95273 小时前
第4.3节 iOS App生成追溯关系
macos·ios·cocoa
玄辰星君12 小时前
【MAC】nacos 2.5.1容器docker安装
macos·docker·nacos
atwdy17 小时前
MacOS安装linux虚拟机
linux·运维·ubuntu·macos·utm
echola_mendes18 小时前
Dify:在MacOS系统下Dify的本地部署与使用
macos
Tim风声(网络工程师)18 小时前
如何通过mac的前24bit,模糊确认是那一台什么样的设备
运维·服务器·网络·macos
菜鸟555551 天前
河南萌新联赛2025第一场-河南工业大学
macos·objective-c·cocoa
名字不要太长 像我这样就好2 天前
【iOS】源码阅读(六)——方法交换
开发语言·macos·ios·objective-c·cocoa
Digitally2 天前
轻松将文件从 iPhone 传输到 Mac
macos·ios·iphone