最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】Mac中再次尝试安装sshpass

Mac crifan 2050浏览 0评论
折腾:
【未解决】Mac中恢复crifan的gitbook的template模板环境
期间,去尝试安装sshpass,试试
 sshpass --helpzsh: command not found: sshpass
然后尝试用brew去安装
 export ALL_PROXY=socks5://127.0.0.1:1086
 brew install sshpassUpdating Homebrew...
==> Auto-updated Homebrew!
。。。
Error: No available formula with the name "sshpass" 
We won't add sshpass because it makes it too easy for novice SSH users to
ruin SSH's security.
找到自己的帖子了:
【已解决】Mac中安装sshpass – 在路上
brew install https://raw.githubusercontent.com/kadwanev/bigboybrew/master/Library/Formula/sshpass.rb
结果:
【未解决】Mac中brew安装报错:curl 35 LibreSSL SSL_connect SSL_ERROR_SYSCALL in connection to
macos – How to install sshpass on mac? – Stack Overflow
换另外一个试试
brew install http://git.io/sshpass.rb
结果:
 brew install http://git.io/sshpass.rb
Updating Homebrew...
Warning: Calling Non-checksummed download of sshpass formula file from an arbitrary URL is deprecated! Use 'brew extract' or 'brew create' and 'brew tap-new' to create a formula file in a tap on GitHub instead.

curl: (52) Empty reply from server
Error: Failure while executing; `/usr/bin/curl --disable --globoff --show-error --user-agent Homebrew/2.3.0\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.14.6\)\ curl/7.54.0 --fail --progress-bar --retry 3 --location --remote-time --continue-at 0 --output /Users/xxx/Library/Caches/Homebrew/Formula/sshpass.rb http://git.io/sshpass.rb` exited with 52. Here's the output:

curl: (52) Empty reply from server
Installing SSHPass
MacOS Mojave 安装sshpass – That’s_it – 博客园
算了,直接从源码安装:
curl -O -L https://fossies.org/linux/privat/sshpass-1.06.tar.gz && tar xvzf sshpass-1.06.tar.gz
cd sshpass-1.06
./configure
sudo make install
期间也是:
【未解决】Mac中brew安装报错:curl 35 LibreSSL SSL_connect SSL_ERROR_SYSCALL in connection to
不过也去看看
The Fossies Software Archive – linux/privat
sshpass 1.06 – Download, Browsing & More | Fossies Archive
然后直接浏览器打开
https://fossies.org/linux/privat/sshpass-1.06.tar.gz
可以下载到:
sshpass-1.06.tar.gz
去解压
 xxx@xxx  ~/dev/src/sshpass  ll
total 224
-rw-r--r--@ 1 xxx  CORP\Domain Users   110K  6 18 17:52 sshpass-1.06.tar.gz
 xxx@xxx  ~/dev/src/sshpass  tar xvf sshpass-1.06.tar.gz
x sshpass-1.06/
x sshpass-1.06/main.c
x sshpass-1.06/install-sh
x sshpass-1.06/AUTHORS
x sshpass-1.06/config.h.in
x sshpass-1.06/depcomp
x sshpass-1.06/aclocal.m4
x sshpass-1.06/configure
x sshpass-1.06/NEWS
x sshpass-1.06/compile
x sshpass-1.06/ChangeLog
x sshpass-1.06/INSTALL
x sshpass-1.06/Makefile.am
x sshpass-1.06/sshpass.1
x sshpass-1.06/COPYING
x sshpass-1.06/README
x sshpass-1.06/Makefile.in
x sshpass-1.06/configure.ac
x sshpass-1.06/missing
 xxx@xxx  ~/dev/src/sshpass  ll
total 224
drwxr-xr-x@ 20 xxx  CORP\Domain Users   640B  7  1  2016 sshpass-1.06
-rw-r--r--@  1 xxx  CORP\Domain Users   110K  6 18 17:52 sshpass-1.06.tar.gz
 xxx@xxx  ~/dev/src/sshpass  cd sshpass-1.06
 xxx@xxx  ~/dev/src/sshpass/sshpass-1.06  ll
total 848
-rw-r--r--@ 1 xxx  CORP\Domain Users   700B  4 26  2015 AUTHORS
-rw-r--r--@ 1 xxx  CORP\Domain Users    18K  4 26  2015 COPYING
-rw-r--r--@ 1 xxx  CORP\Domain Users   1.7K  7  1  2016 ChangeLog
-rw-r--r--@ 1 xxx  CORP\Domain Users    15K  4 26  2015 INSTALL
-rw-r--r--@ 1 xxx  CORP\Domain Users   145B  4 26  2015 Makefile.am
-rw-r--r--@ 1 xxx  CORP\Domain Users    26K  7  1  2016 Makefile.in
-rw-r--r--@ 1 xxx  CORP\Domain Users   213B  4 26  2015 NEWS
-rw-r--r--@ 1 xxx  CORP\Domain Users     0B  4 26  2015 README
-rw-r--r--@ 1 xxx  CORP\Domain Users    42K  7  1  2016 aclocal.m4
-rwxr-xr-x@ 1 xxx  CORP\Domain Users   7.2K  4 26  2015 compile
-rw-r--r--@ 1 xxx  CORP\Domain Users   4.1K  7  1  2016 config.h.in
-rwxr-xr-x@ 1 xxx  CORP\Domain Users   206K  7  1  2016 configure
-rw-r--r--@ 1 xxx  CORP\Domain Users   1.1K  7  1  2016 configure.ac
-rwxr-xr-x@ 1 xxx  CORP\Domain Users    23K  4 26  2015 depcomp
-rwxr-xr-x@ 1 xxx  CORP\Domain Users    14K  4 26  2015 install-sh
-rw-r--r--@ 1 xxx  CORP\Domain Users    14K  7  1  2016 main.c
-rwxr-xr-x@ 1 xxx  CORP\Domain Users   6.7K  4 26  2015 missing
-rw-r--r--@ 1 xxx  CORP\Domain Users   5.1K  7  1  2016 sshpass.1
去安装试试
xxx@xxx  ~/dev/src/sshpass/sshpass-1.06  ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking for unistd.h... (cached) yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking for an ANSI C-conforming const... yes
checking for pid_t... yes
checking for ssize_t... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking whether gcc needs -traditional... no
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking return type of signal handlers... void
checking for select... yes
checking for posix_openpt... yes
checking for strdup... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands


 xxx@xxx  ~/dev/src/sshpass/sshpass-1.06  sudo make install
Password:
gcc -DHAVE_CONFIG_H -I.   -I/usr/local/opt/node@8/include  -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
mv -f .deps/main.Tpo .deps/main.Po
gcc  -g -O2  -L/usr/local/opt/node@8/lib -o sshpass main.o
 ./install-sh -c -d '/usr/local/bin'
  /usr/bin/install -c sshpass '/usr/local/bin'
 ./install-sh -c -d '/usr/local/share/man/man1'
 /usr/bin/install -c -m 644 sshpass.1 '/usr/local/share/man/man1'
去看看路径:
  which sshpass
./sshpass
 sshpass --help
sshpass: illegal option -- -
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
 sshpass -V
sshpass 1.06
(C) 2006-2011 Lingnu Open Source Consulting Ltd.
(C) 2015-2016 Shachar Shemesh
This program is free software, and can be distributed under the terms of the GPL
See the COPYING file for more information.


Using "assword" as the default password prompt indicator.
感觉算是成功安装了?

转载请注明:在路上 » 【已解决】Mac中再次尝试安装sshpass

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
89 queries in 0.194 seconds, using 22.10MB memory