MacOS 安装 sshpass

2019-08-27  本文已影响0人  BestFei

一、下载安装包
https://sourceforge.net/projects/sshpass/

二、解压包
解压到当前文件夹
tar -zxvf sshpass-版本号.tar.gz
tar -zxvf sshpass-1.06.tar.gz

三、进入解压后的文件夹
cd sshpass-版本号
cd sshpass-1.06

$ cd sshpass-1.06
$ ls
AUTHORS     Makefile.am aclocal.m4  configure.ac    missing
COPYING     Makefile.in compile     depcomp     sshpass.1
ChangeLog   NEWS        config.h.in install-sh
INSTALL     README      configure   main.c

四、开始源代码安装第一步检验环境
sh configure

五、编译源代码
make&&make install

六、安装完后输入 sshpass 如果出现以下提示则视为安装成功

$ 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
上一篇下一篇

猜你喜欢

热点阅读