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 [端口]
相关推荐
图灵机z16 分钟前
【操作系统】四、进程管理
linux·服务器·网络·windows·macos·centos·risc-v
独隅3 小时前
MacOS 上部署 PyTorch 模型的详细步骤
人工智能·pytorch·macos
@大迁世界19 小时前
M6 Pro 的特性将彻底改变我们对 macOS 的认知
macos
superantwmhsxx1 天前
[golang][MAC]Go环境搭建+VsCode配置
vscode·macos·golang
一次旅行1 天前
Mac本地部署OpenClaw优化
开发语言·macos·php
cungudafa1 天前
【Xcode 26.4】报错netinet6/in6.h和comparison ‘X < Y < Z‘
macos·蓝桥杯·xcode
qq_4924484461 天前
AirTest APP UI自动化测试框架
macos·ui·cocoa
TomSmile_WorkSpace1 天前
Mac 下手动安装 PicGo Gitee 上传插件解决方案
macos·gitee
feasibility.1 天前
Mac终端的tmux会话使用Codex 时Ctrl+V 可能触发异常并导致会话假死问题以及解决方法
linux·运维·macos·tmux·codex
zhensherlock1 天前
Protocol Launcher 系列:Pika 取色器的协议控制(上篇)
前端·javascript·macos·typescript·github·mac·view design