Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Installing SSHPass

Installing SSHPASS

SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.

Installing on Ubuntu

apt-get install sshpass

Installing on OS X

Installing on OS X is tricky, since there is no official build for it. Before you get started, you need install xcode and command line tools.

Installing with Homebrew

Homebrew does not allow you to install sshpass by default. But you can use the following unofficial brew package for that.

brew install https://raw.githubusercontent.com/kadwanev/bigboybrew/master/Library/Formula/sshpass.rb

Installing from the Source

  • Download the Source Code
  • Extract it and cd into the directory
  • ./configure
  • sudo make install
@dotnetwise

This comment has been minimized.

Copy link

@dotnetwise dotnetwise commented Mar 20, 2015

brew install https://raw.github.com/eugeneoden/homebrew/eca9de1/Library/Formula/sshpass.rb
fails

$ brew install https://raw.github.com/eugeneoden/homebrew/eca9de1/Library/Formula/sshpass.rb
######################################################################## 100.0%
==> Downloading http://sourceforge.net/projects/sshpass/files/sshpass/1.05/sshpa
Already downloaded: /Library/Caches/Homebrew/sshpass-1.05.tar.gz
Warning: MD5 support is deprecated and will be removed in a future version.
Please switch this formula to SHA1 or SHA256.
Error: MD5 mismatch
Expected: c52d65fdee0712af6f77eb2b60974ac7
Actual: 687fc45d732e5c45b5830e63f647e978
Archive: /Library/Caches/Homebrew/sshpass-1.05.tar.gz
To retry an incomplete download, remove the file above.
@victorbstan

This comment has been minimized.

Copy link

@victorbstan victorbstan commented Mar 25, 2015

brew install https://raw.github.com/eugeneoden/homebrew/eca9de1/Library/Formula/ss

################################################################## 100.0%

==> Downloading http://sourceforge.net/projects/sshpass/files/sshpass/1.05/sshpass-1.05.tar.gz

################################################################## 100.0%

Warning: MD5 support is deprecated and will be removed in a future version.
Please switch this formula to SHA1 or SHA256.

@kadwanev

This comment has been minimized.

Copy link

@kadwanev kadwanev commented Apr 17, 2015

@arunoda

This comment has been minimized.

Copy link
Owner Author

@arunoda arunoda commented May 5, 2015

Thanks @kadwanev
Updated.

@tawanda

This comment has been minimized.

Copy link

@tawanda tawanda commented Sep 18, 2015

Thanks mate

@gil-andre

This comment has been minimized.

Copy link

@gil-andre gil-andre commented Jan 28, 2016

On Mac OS X "El Capitan" (version 10.11.3 15D21), sshpass can be compiled with "./configure ; make ; sudo make install" provided xcode and command-line tools are installed first.

@neuwirthe

This comment has been minimized.

Copy link

@neuwirthe neuwirthe commented Apr 19, 2016

brew create https://sourceforge.net/projects/sshpass/files/sshpass/1.05/sshpass-1.05.tar.gz --force

will create a formula which you then can use normally as

brew install sshpass

@qunwang6

This comment has been minimized.

Copy link

@qunwang6 qunwang6 commented Aug 31, 2016

how to build for ios?

@judge2020

This comment has been minimized.

Copy link

@judge2020 judge2020 commented Sep 5, 2016

@qunwang6 considering you install both terminal and command-line utilities for iOS, "./configure ; make ; sudo make install" should work since iOS is still unix-based.

@sparkmuse

This comment has been minimized.

Copy link

@sparkmuse sparkmuse commented Sep 14, 2016

How can I uninstall if I installed it using the source code ?

@lukesUbuntu

This comment has been minimized.

Copy link

@lukesUbuntu lukesUbuntu commented Sep 20, 2016

Just use brew
$brew install http://git.io/sshpass.rb

@bostondevin

This comment has been minimized.

Copy link

@bostondevin bostondevin commented May 11, 2017

yum install sshpass worked for me

@chusiang

This comment has been minimized.

Copy link

@chusiang chusiang commented Jun 16, 2017

Thank you, it's working on macOS 10.11 for Ansible 2.3.1.

ansible-tw/AMA#21

@sfblaauw

This comment has been minimized.

Copy link

@sfblaauw sfblaauw commented Jun 24, 2017

@lukesUbuntu works form me! Thanks

@FranciscoGutierrez

This comment has been minimized.

Copy link

@FranciscoGutierrez FranciscoGutierrez commented Feb 8, 2018

does this work zshell?

@johannesjo

This comment has been minimized.

Copy link

@johannesjo johannesjo commented Feb 25, 2018

I get the following error:

brew install https://raw.githubusercontent.com/kadwanev/bigboybrew/master/Library/Formula/sshpass.rb
==> Downloading http://sourceforge.net/projects/sshpass/files/sshpass/1.06/sshpass-1.06.tar.gz
==> Downloading from https://sourceforge.net/#!/projects/sshpass/files/sshpass/1.06/sshpass-1.06.tar.gz
Error: SHA256 mismatch
Expected: c6324fcee608b99a58f9870157dfa754837f8c48be3df0f5e2f3accf145dee60
Actual: 7a07d3f7cca5c0b38ca811984ef8da536da32932d68c1a6cce33ec2462b930bf
Archive: /Users/travis/Library/Caches/Homebrew/sshpass-1.06.tar.gz
To retry an incomplete download, remove the file above.
@maximtatar

This comment has been minimized.

Copy link

@maximtatar maximtatar commented Mar 1, 2018

johannesjo, same here on my mac. So I went another suggested above road:
Installing from the Source
Worked as a charm, took < 2min

@zinndesign

This comment has been minimized.

Copy link

@zinndesign zinndesign commented Mar 1, 2018

FYI, I got the same SHA256 error, and it turned out that the SourceForge URL was the issue. If you hit the URL directly:
https://sourceforge.net/#!/projects/sshpass/files/sshpass/1.06/sshpass-1.06.tar.gz

You get an error page reading "The sourceforge.net website is temporarily in static offline mode." Hence the SHA256 mismatch, since it's downloading an HTML page instead of a tarball. This also explained why the install worked fine for me on one Mac yesterday, but failed on another today. (I'm also finding multiple other installs via Homebrew are failing today, probably all due to the SourceForge outage. SourceForge confirmed.)

I found an alternative URL that worked and updated the sshpass.rb script to point to it:
url 'https://fossies.org/linux/privat/sshpass-1.06.tar.gz'

Installed without issue after saving the updated Ruby script to my server and running the brew install command pointing to that URL.

@pawarvijay

This comment has been minimized.

@zh-f

This comment has been minimized.

Copy link

@zh-f zh-f commented Apr 16, 2018

@lukesUbuntu It really helps! Thanks!

@Evgeniy-Odesskiy

This comment has been minimized.

Copy link

@Evgeniy-Odesskiy Evgeniy-Odesskiy commented May 10, 2018

@lukesUbuntu works form me! Thanks!

@shizhongping

This comment has been minimized.

Copy link

@shizhongping shizhongping commented Jun 8, 2018

@lukesUbuntu Thanks, saved my time.

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Jul 31, 2018

If I use brew install, I get this error :

(venv270) kylix3511@kylix3511.com.local:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula$brew install http://git.io/sshpass.rb
########################################################################################################################################################################################################### 100.0%
Warning: sshpass 1.06 is available and more recent than version 1.05.
==> Downloading http://sourceforge.net/projects/sshpass/files/sshpass/1.05/sshpass-1.05.tar.gz
Already downloaded: /Users/kylix3511/Library/Caches/Homebrew/sshpass-1.05.tar.gz
==> ./configure --prefix=/usr/local/Cellar/sshpass/1.05
Last 15 lines from /Users/kylix3511/Library/Logs/Homebrew/sshpass/01.configure:
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 for style of include used by make... GNU
checking for gcc... clang
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... configure: error: in /private/tmp/sshpass-20180731-32484-12yvgpo/sshpass-1.05': configure: error: cannot run C compiled programs. If you meant to cross compile, use --host'.
See `config.log' for more details

Do not report this issue to Homebrew/brew or Homebrew/core!

(venv270) kylix3511@kylix3511.com.local:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula$

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Jul 31, 2018

If I use configure, method, I get this error :

(venv270) kylix3511@kylix3511.com.local:sshpass-1.06$ls -lrt
total 1392
-rw-r--r-- 1 kylix3511 staff 0 Apr 25 2015 README
-rw-r--r-- 1 kylix3511 staff 213 Apr 25 2015 NEWS
-rw-r--r-- 1 kylix3511 staff 145 Apr 25 2015 Makefile.am
-rw-r--r-- 1 kylix3511 staff 17992 Apr 25 2015 COPYING
-rw-r--r-- 1 kylix3511 staff 700 Apr 25 2015 AUTHORS
-rwxr-xr-x 1 kylix3511 staff 6872 Apr 25 2015 missing
-rwxr-xr-x 1 kylix3511 staff 13997 Apr 25 2015 install-sh
-rwxr-xr-x 1 kylix3511 staff 23566 Apr 25 2015 depcomp
-rwxr-xr-x 1 kylix3511 staff 7333 Apr 25 2015 compile
-rw-r--r-- 1 kylix3511 staff 15752 Apr 25 2015 INSTALL
-rw-r--r-- 1 kylix3511 staff 5251 Jun 30 2016 sshpass.1
-rw-r--r-- 1 kylix3511 staff 14481 Jun 30 2016 main.c
-rw-r--r-- 1 kylix3511 staff 1159 Jun 30 2016 configure.ac
-rwxr-xr-x 1 kylix3511 staff 210576 Jun 30 2016 configure
-rw-r--r-- 1 kylix3511 staff 43150 Jun 30 2016 aclocal.m4
-rw-r--r-- 1 kylix3511 staff 27009 Jun 30 2016 Makefile.in
-rw-r--r-- 1 kylix3511 staff 4160 Jun 30 2016 config.h.in
-rw-r--r-- 1 kylix3511 staff 1721 Jun 30 2016 ChangeLog
-rw-r--r-- 1 root staff 4536 Jul 31 12:18 config.h
-rwxr-xr-x 1 root staff 33285 Jul 31 12:18 config.status
-rw-r--r-- 1 root staff 26863 Jul 31 12:18 Makefile
-rw-r--r-- 1 root staff 23 Jul 31 12:18 stamp-h1
-rw-r--r-- 1 kylix3511 staff 199269 Jul 31 12:18 config.log
(venv270) kylix3511@kylix3511.com.local:sshpass-1.06$sudo ./configure
Password:
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... configure: error: in /Users/kylix3511/sshpass-1.06': configure: error: cannot run C compiled programs. If you meant to cross compile, use --host'.
See `config.log' for more details
(venv270) kylix3511@kylix3511.com.local:sshpass-1.06$

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Jul 31, 2018

(venv270) kylix3511@kylix3511.com.local:sshpass-1.06$
(venv270) kylix3511@kylix3511.com.local:sshpass-1.06$
(venv270) kylix3511@kylix3511.com.local:sshpass-1.06$sudo ./configure --host=localhost
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for localhost-strip... no
checking for strip... strip
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 localhost-gcc... no
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... yes
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... unsupported
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... no
checking for sys/types.h... no
checking for sys/stat.h... no
checking for stdlib.h... no
checking for string.h... no
checking for memory.h... no
checking for strings.h... no
checking for inttypes.h... no
checking for stdint.h... no
checking for unistd.h... no
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... no
checking for localhost-gcc... 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) unsupported
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking for ANSI C header files... (cached) no
checking for sys/wait.h that is POSIX.1 compatible... yes
checking fcntl.h usability... no
checking fcntl.h presence... yes
configure: WARNING: fcntl.h: present but cannot be compiled
configure: WARNING: fcntl.h: check for missing prerequisite headers?
configure: WARNING: fcntl.h: see the Autoconf documentation
configure: WARNING: fcntl.h: section "Present But Cannot Be Compiled"
configure: WARNING: fcntl.h: proceeding with the compiler's result
checking for fcntl.h... no
checking for stdlib.h... (cached) no
checking for string.h... (cached) no
checking sys/ioctl.h usability... no
checking sys/ioctl.h presence... yes
configure: WARNING: sys/ioctl.h: present but cannot be compiled
configure: WARNING: sys/ioctl.h: check for missing prerequisite headers?
configure: WARNING: sys/ioctl.h: see the Autoconf documentation
configure: WARNING: sys/ioctl.h: section "Present But Cannot Be Compiled"
configure: WARNING: sys/ioctl.h: proceeding with the compiler's result
checking for sys/ioctl.h... no
checking for unistd.h... (cached) no
checking termios.h usability... no
checking termios.h presence... yes
configure: WARNING: termios.h: present but cannot be compiled
configure: WARNING: termios.h: check for missing prerequisite headers?
configure: WARNING: termios.h: see the Autoconf documentation
configure: WARNING: termios.h: section "Present But Cannot Be Compiled"
configure: WARNING: termios.h: proceeding with the compiler's result
checking for termios.h... no
checking for an ANSI C-conforming const... yes
checking for pid_t... no
checking for ssize_t... no
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... cross
configure: WARNING: result yes guessed because of cross compilation
checking for working vfork... (cached) yes
checking whether gcc needs -traditional... no
checking for stdlib.h... (cached) no
checking for GNU libc compatible malloc... no
checking sys/select.h usability... no
checking sys/select.h presence... yes
configure: WARNING: sys/select.h: present but cannot be compiled
configure: WARNING: sys/select.h: check for missing prerequisite headers?
configure: WARNING: sys/select.h: see the Autoconf documentation
configure: WARNING: sys/select.h: section "Present But Cannot Be Compiled"
configure: WARNING: sys/select.h: proceeding with the compiler's result
checking for sys/select.h... no
checking sys/socket.h usability... no
checking sys/socket.h presence... yes
configure: WARNING: sys/socket.h: present but cannot be compiled
configure: WARNING: sys/socket.h: check for missing prerequisite headers?
configure: WARNING: sys/socket.h: see the Autoconf documentation
configure: WARNING: sys/socket.h: section "Present But Cannot Be Compiled"
configure: WARNING: sys/socket.h: proceeding with the compiler's result
checking for sys/socket.h... no
checking types of arguments for select... int,int *,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: config.h is unchanged
config.status: executing depfiles commands
(venv270) kylix3511@kylix3511.com.local:sshpass-1.06$sudo make
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
In file included from main.c:25:
In file included from /usr/include/sys/types.h:122:
/usr/include/sys/_types/_pid_t.h:31:31: error: cannot combine with previous 'type-name' declaration specifier
typedef __darwin_pid_t pid_t;
^
./config.h:158:15: note: expanded from macro 'pid_t'
#define pid_t int
^
In file included from main.c:25:
In file included from /usr/include/sys/types.h:164:
/usr/include/sys/_types/_ssize_t.h:31:33: error: cannot combine with previous 'type-name' declaration specifier
typedef __darwin_ssize_t ssize_t;
^
./config.h:161:17: note: expanded from macro 'ssize_t'
#define ssize_t int
^
In file included from main.c:38:
/usr/local/include/stdio.h:34:56: error: unknown type name 'FILE'
isc_stdio_open(const char *filename, const char *mode, FILE **fp);
^
/usr/local/include/stdio.h:38:17: error: unknown type name 'FILE'
isc_stdio_close(FILE *f);
^
/usr/local/include/stdio.h:42:16: error: unknown type name 'FILE'
isc_stdio_seek(FILE *f, off_t offset, int whence);
^
/usr/local/include/stdio.h:46:16: error: unknown type name 'FILE'
isc_stdio_tell(FILE *f, off_t *offsetp);
^
/usr/local/include/stdio.h:50:54: error: unknown type name 'FILE'
isc_stdio_read(void *ptr, size_t size, size_t nmemb, FILE *f,
^
/usr/local/include/stdio.h:55:61: error: unknown type name 'FILE'
isc_stdio_write(const void *ptr, size_t size, size_t nmemb, FILE *f,
^
/usr/local/include/stdio.h:60:17: error: unknown type name 'FILE'
isc_stdio_flush(FILE *f);
^
/usr/local/include/stdio.h:63:16: error: unknown type name 'FILE'
isc_stdio_sync(FILE *f);
^
main.c:79:5: warning: implicitly declaring library function 'printf' with type 'int (const char *, ...)' [-Wimplicit-function-declaration]
printf("Usage: " PACKAGE_NAME " [-f|-d|-p|-e] [-hV] command parameters\n"
^
main.c:79:5: note: include the header <stdio.h> or explicitly provide a declaration for 'printf'
main.c:111:6: warning: implicit declaration of function 'fprintf' is invalid in C99 [-Wimplicit-function-declaration]
VIRGIN_PWTYPE;
^
main.c:104:5: note: expanded from macro 'VIRGIN_PWTYPE'
fprintf(stderr, "Conflicting password source\n");
^
main.c:111:6: warning: declaration of built-in function 'fprintf' requires inclusion of the header <stdio.h> [-Wbuiltin-requires-header]
main.c:104:5: note: expanded from macro 'VIRGIN_PWTYPE'
fprintf(stderr, "Conflicting password source\n");
^
main.c:111:6: error: use of undeclared identifier 'stderr'
main.c:104:13: note: expanded from macro 'VIRGIN_PWTYPE'
fprintf(stderr, "Conflicting password source\n");
^
main.c:118:6: error: use of undeclared identifier 'stderr'
VIRGIN_PWTYPE;
^
main.c:104:13: note: expanded from macro 'VIRGIN_PWTYPE'
fprintf(stderr, "Conflicting password source\n");
^
main.c:121:20: warning: implicit declaration of function 'atoi' is invalid in C99 [-Wimplicit-function-declaration]
args.pwsrc.fd=atoi(optarg);
^
main.c:125:6: error: use of undeclared identifier 'stderr'
VIRGIN_PWTYPE;
^
main.c:104:13: note: expanded from macro 'VIRGIN_PWTYPE'
fprintf(stderr, "Conflicting password source\n");
^
main.c:128:26: warning: implicitly declaring library function 'strdup' with type 'char *(const char *)' [-Wimplicit-function-declaration]
args.pwsrc.password=strdup(optarg);
^
main.c:128:26: note: include the header <string.h> or explicitly provide a declaration for 'strdup'
main.c:145:6: error: use of undeclared identifier 'stderr'
VIRGIN_PWTYPE;
^
main.c:104:13: note: expanded from macro 'VIRGIN_PWTYPE'
fprintf(stderr, "Conflicting password source\n");
^
main.c:148:26: warning: implicit declaration of function 'getenv' is invalid in C99 [-Wimplicit-function-declaration]
args.pwsrc.password=getenv("SSHPASS");
^
main.c:148:25: warning: incompatible integer to pointer conversion assigning to 'const char *' from 'int' [-Wint-conversion]
args.pwsrc.password=getenv("SSHPASS");
^~~~~~~~~~~~~~~~~~
main.c:150:25: error: use of undeclared identifier 'stderr'
fprintf(stderr, "sshpass: -e option given but SSHPASS environment variable not set\n");
^
main.c:170:6: warning: implicitly declaring library function 'exit' with type 'void (int) attribute((noreturn))' [-Wimplicit-function-declaration]
exit(0);
^
main.c:170:6: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'
main.c:218:14: warning: implicit declaration of function 'posix_openpt' is invalid in C99 [-Wimplicit-function-declaration]
masterpt=posix_openpt(O_RDWR);
^
main.c:221:2: warning: implicit declaration of function 'perror' is invalid in C99 [-Wimplicit-function-declaration]
perror("Failed to get a pseudo terminal");
^
main.c:228:9: warning: implicit declaration of function 'grantpt' is invalid in C99 [-Wimplicit-function-declaration]
if( grantpt( masterpt )!=0 ) {
^
main.c:233:9: warning: implicit declaration of function 'unlockpt' is invalid in C99 [-Wimplicit-function-declaration]
if( unlockpt( masterpt )!=0 ) {
^
main.c:246:22: warning: implicit declaration of function 'ptsname' is invalid in C99 [-Wimplicit-function-declaration]
const char *name=ptsname(masterpt);
^
main.c:246:17: warning: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Wint-conversion]
const char *name=ptsname(masterpt);
^ ~~~~~~~~~~~~~~~~~
main.c:287:18: warning: implicit declaration of function 'rpl_malloc' is invalid in C99 [-Wimplicit-function-declaration]
char **new_argv=malloc(sizeof(char )(argc+1));
^
./config.h:155:16: note: expanded from macro 'malloc'
#define malloc rpl_malloc
^
main.c:287:9: warning: incompatible integer to pointer conversion initializing 'char **' with an expression of type 'int' [-Wint-conversion]
char **new_argv=malloc(sizeof(char )(argc+1));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:392:17: error: use of undeclared identifier 'stderr'
fprintf(stderr, "SSHPASS searching for password prompt using match "%s"\n", compare1);
^
main.c:398:17: error: use of undeclared identifier 'stderr'
fprintf(stderr, "SSHPASS read: %s\n", buffer);
^
main.c:407:25: error: use of undeclared identifier 'stderr'
fprintf(stderr, "SSHPASS detected prompt. Sending password.\n");
^
main.c:414:25: error: use of undeclared identifier 'stderr'
fprintf(stderr, "SSHPASS detected prompt, again. Wrong password. Terminating.\n");
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
16 warnings and 20 errors generated.
make[1]: *** [main.o] Error 1
make: *** [all] Error 2
(venv270) kylix3511@kylix3511.com.local:sshpass-1.06$

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Jul 31, 2018

-1.05
[I] kylix3511@kylix3511.com.local~/Downloads> cd test1/sshpass/
[I] kylix3511@kylix3511.com.local~/D/t/sshpass> ls -lrt
total 1416
-rw-r--r-- 1 kylix3511 staff 702 Jul 30 17:00 AUTHORS
-rw-r--r-- 1 kylix3511 staff 17992 Jul 30 17:00 COPYING
-rw-r--r-- 1 kylix3511 staff 1721 Jul 30 17:00 ChangeLog
-rw-r--r-- 1 kylix3511 staff 15752 Jul 30 17:00 INSTALL
-rw-r--r-- 1 kylix3511 staff 761 Jul 30 17:00 LICENSE
-rw-r--r-- 1 kylix3511 staff 145 Jul 30 17:00 Makefile.am
-rw-r--r-- 1 kylix3511 staff 27009 Jul 30 17:00 Makefile.in
-rw-r--r-- 1 kylix3511 staff 213 Jul 30 17:00 NEWS
-rw-r--r-- 1 kylix3511 staff 417 Jul 30 17:00 README.md
-rw-r--r-- 1 kylix3511 staff 43150 Jul 30 17:00 aclocal.m4
-rwxr-xr-x 1 kylix3511 staff 57 Jul 30 17:00 bootstrap
-rwxr-xr-x 1 kylix3511 staff 7333 Jul 30 17:00 compile
-rw-r--r-- 1 kylix3511 staff 4160 Jul 30 17:00 config.h.in
-rwxr-xr-x 1 kylix3511 staff 210576 Jul 30 17:00 configure
-rw-r--r-- 1 kylix3511 staff 1159 Jul 30 17:00 configure.ac
-rwxr-xr-x 1 kylix3511 staff 23566 Jul 30 17:00 depcomp
-rwxr-xr-x 1 kylix3511 staff 13997 Jul 30 17:00 install-sh
-rw-r--r-- 1 kylix3511 staff 14481 Jul 30 17:00 main.c
-rwxr-xr-x 1 kylix3511 staff 6872 Jul 30 17:00 missing
-rw-r--r-- 1 kylix3511 staff 5251 Jul 30 17:00 sshpass.1
-rwxr-xr-x 1 kylix3511 staff 33362 Jul 30 17:01 config.status
-rw-r--r-- 1 kylix3511 staff 26973 Jul 30 17:01 Makefile
-rw-r--r-- 1 kylix3511 staff 4536 Jul 30 17:01 config.h
-rw-r--r-- 1 kylix3511 staff 23 Jul 30 17:01 stamp-h1
-rw-r--r-- 1 kylix3511 staff 199256 Jul 30 17:01 config.log
[I] kylix3511@kylix3511.com.local~/D/t/sshpass> ls -lrt
total 1416
-rw-r--r-- 1 kylix3511 staff 702 Jul 30 17:00 AUTHORS
-rw-r--r-- 1 kylix3511 staff 17992 Jul 30 17:00 COPYING
-rw-r--r-- 1 kylix3511 staff 1721 Jul 30 17:00 ChangeLog
-rw-r--r-- 1 kylix3511 staff 15752 Jul 30 17:00 INSTALL
-rw-r--r-- 1 kylix3511 staff 761 Jul 30 17:00 LICENSE
-rw-r--r-- 1 kylix3511 staff 145 Jul 30 17:00 Makefile.am
-rw-r--r-- 1 kylix3511 staff 27009 Jul 30 17:00 Makefile.in
-rw-r--r-- 1 kylix3511 staff 213 Jul 30 17:00 NEWS
-rw-r--r-- 1 kylix3511 staff 417 Jul 30 17:00 README.md
-rw-r--r-- 1 kylix3511 staff 43150 Jul 30 17:00 aclocal.m4
-rwxr-xr-x 1 kylix3511 staff 57 Jul 30 17:00 bootstrap
-rwxr-xr-x 1 kylix3511 staff 7333 Jul 30 17:00 compile
-rw-r--r-- 1 kylix3511 staff 4160 Jul 30 17:00 config.h.in
-rwxr-xr-x 1 kylix3511 staff 210576 Jul 30 17:00 configure
-rw-r--r-- 1 kylix3511 staff 1159 Jul 30 17:00 configure.ac
-rwxr-xr-x 1 kylix3511 staff 23566 Jul 30 17:00 depcomp
-rwxr-xr-x 1 kylix3511 staff 13997 Jul 30 17:00 install-sh
-rw-r--r-- 1 kylix3511 staff 14481 Jul 30 17:00 main.c
-rwxr-xr-x 1 kylix3511 staff 6872 Jul 30 17:00 missing
-rw-r--r-- 1 kylix3511 staff 5251 Jul 30 17:00 sshpass.1
-rwxr-xr-x 1 kylix3511 staff 33362 Jul 30 17:01 config.status
-rw-r--r-- 1 kylix3511 staff 26973 Jul 30 17:01 Makefile
-rw-r--r-- 1 kylix3511 staff 4536 Jul 30 17:01 config.h
-rw-r--r-- 1 kylix3511 staff 23 Jul 30 17:01 stamp-h1
-rw-r--r-- 1 kylix3511 staff 199256 Jul 30 17:01 config.log
[I] kylix3511@kylix3511.com.local~/D/t/sshpass> sudo ./configure --host=i368
Password:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for i368-strip... no
checking for strip... strip
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 i368-gcc... no
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... yes
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... unsupported
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... no
checking for sys/types.h... no
checking for sys/stat.h... no
checking for stdlib.h... no
checking for string.h... no
checking for memory.h... no
checking for strings.h... no
checking for inttypes.h... no
checking for stdint.h... no
checking for unistd.h... no
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... no
checking for i368-gcc... 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) unsupported
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking for ANSI C header files... (cached) no
checking for sys/wait.h that is POSIX.1 compatible... yes
checking fcntl.h usability... no
checking fcntl.h presence... yes
configure: WARNING: fcntl.h: present but cannot be compiled
configure: WARNING: fcntl.h: check for missing prerequisite headers?
configure: WARNING: fcntl.h: see the Autoconf documentation
configure: WARNING: fcntl.h: section "Present But Cannot Be Compiled"
configure: WARNING: fcntl.h: proceeding with the compiler's result
checking for fcntl.h... no
checking for stdlib.h... (cached) no
checking for string.h... (cached) no
checking sys/ioctl.h usability... no
checking sys/ioctl.h presence... yes
configure: WARNING: sys/ioctl.h: present but cannot be compiled
configure: WARNING: sys/ioctl.h: check for missing prerequisite headers?
configure: WARNING: sys/ioctl.h: see the Autoconf documentation
configure: WARNING: sys/ioctl.h: section "Present But Cannot Be Compiled"
configure: WARNING: sys/ioctl.h: proceeding with the compiler's result
checking for sys/ioctl.h... no
checking for unistd.h... (cached) no
checking termios.h usability... no
checking termios.h presence... yes
configure: WARNING: termios.h: present but cannot be compiled
configure: WARNING: termios.h: check for missing prerequisite headers?
configure: WARNING: termios.h: see the Autoconf documentation
configure: WARNING: termios.h: section "Present But Cannot Be Compiled"
configure: WARNING: termios.h: proceeding with the compiler's result
checking for termios.h... no
checking for an ANSI C-conforming const... yes
checking for pid_t... no
checking for ssize_t... no
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... cross
configure: WARNING: result yes guessed because of cross compilation
checking for working vfork... (cached) yes
checking whether gcc needs -traditional... no
checking for stdlib.h... (cached) no
checking for GNU libc compatible malloc... no
checking sys/select.h usability... no
checking sys/select.h presence... yes
configure: WARNING: sys/select.h: present but cannot be compiled
configure: WARNING: sys/select.h: check for missing prerequisite headers?
configure: WARNING: sys/select.h: see the Autoconf documentation
configure: WARNING: sys/select.h: section "Present But Cannot Be Compiled"
configure: WARNING: sys/select.h: proceeding with the compiler's result
checking for sys/select.h... no
checking sys/socket.h usability... no
checking sys/socket.h presence... yes
configure: WARNING: sys/socket.h: present but cannot be compiled
configure: WARNING: sys/socket.h: check for missing prerequisite headers?
configure: WARNING: sys/socket.h: see the Autoconf documentation
configure: WARNING: sys/socket.h: section "Present But Cannot Be Compiled"
configure: WARNING: sys/socket.h: proceeding with the compiler's result
checking for sys/socket.h... no
checking types of arguments for select... int,int *,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: config.h is unchanged
config.status: executing depfiles commands
[I] kylix3511@kylix3511.com.local~/D/t/sshpass> sudo make
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
In file included from main.c:25:
In file included from /usr/include/sys/types.h:122:
/usr/include/sys/_types/_pid_t.h:31:31: error: cannot combine with previous 'type-name' declaration specifier
typedef __darwin_pid_t pid_t;
^
./config.h:158:15: note: expanded from macro 'pid_t'
#define pid_t int
^
In file included from main.c:25:
In file included from /usr/include/sys/types.h:164:
/usr/include/sys/_types/_ssize_t.h:31:33: error: cannot combine with previous 'type-name' declaration specifier
typedef __darwin_ssize_t ssize_t;
^
./config.h:161:17: note: expanded from macro 'ssize_t'
#define ssize_t int
^
In file included from main.c:38:
/usr/local/include/stdio.h:34:56: error: unknown type name 'FILE'
isc_stdio_open(const char *filename, const char *mode, FILE **fp);
^
/usr/local/include/stdio.h:38:17: error: unknown type name 'FILE'
isc_stdio_close(FILE *f);
^
/usr/local/include/stdio.h:42:16: error: unknown type name 'FILE'
isc_stdio_seek(FILE *f, off_t offset, int whence);
^
/usr/local/include/stdio.h:46:16: error: unknown type name 'FILE'
isc_stdio_tell(FILE *f, off_t *offsetp);
^
/usr/local/include/stdio.h:50:54: error: unknown type name 'FILE'
isc_stdio_read(void *ptr, size_t size, size_t nmemb, FILE *f,
^
/usr/local/include/stdio.h:55:61: error: unknown type name 'FILE'
isc_stdio_write(const void *ptr, size_t size, size_t nmemb, FILE *f,
^
/usr/local/include/stdio.h:60:17: error: unknown type name 'FILE'
isc_stdio_flush(FILE *f);
^
/usr/local/include/stdio.h:63:16: error: unknown type name 'FILE'
isc_stdio_sync(FILE *f);
^
main.c:79:5: warning: implicitly declaring library function 'printf' with type 'int (const char *, ...)' [-Wimplicit-function-declaration]
printf("Usage: " PACKAGE_NAME " [-f|-d|-p|-e] [-hV] command parameters\n"
^
main.c:79:5: note: include the header <stdio.h> or explicitly provide a declaration for 'printf'
main.c:111:6: warning: implicit declaration of function 'fprintf' is invalid in C99 [-Wimplicit-function-declaration]
VIRGIN_PWTYPE;
^
main.c:104:5: note: expanded from macro 'VIRGIN_PWTYPE'
fprintf(stderr, "Conflicting password source\n");
^
main.c:111:6: warning: declaration of built-in function 'fprintf' requires inclusion of the header <stdio.h> [-Wbuiltin-requires-header]
main.c:104:5: note: expanded from macro 'VIRGIN_PWTYPE'
fprintf(stderr, "Conflicting password source\n");
^
main.c:111:6: error: use of undeclared identifier 'stderr'
main.c:104:13: note: expanded from macro 'VIRGIN_PWTYPE'
fprintf(stderr, "Conflicting password source\n");
^
main.c:118:6: error: use of undeclared identifier 'stderr'
VIRGIN_PWTYPE;
^
main.c:104:13: note: expanded from macro 'VIRGIN_PWTYPE'
fprintf(stderr, "Conflicting password source\n");
^
main.c:121:20: warning: implicit declaration of function 'atoi' is invalid in C99 [-Wimplicit-function-declaration]
args.pwsrc.fd=atoi(optarg);
^
main.c:125:6: error: use of undeclared identifier 'stderr'
VIRGIN_PWTYPE;
^
main.c:104:13: note: expanded from macro 'VIRGIN_PWTYPE'
fprintf(stderr, "Conflicting password source\n");
^
main.c:128:26: warning: implicitly declaring library function 'strdup' with type 'char *(const char *)' [-Wimplicit-function-declaration]
args.pwsrc.password=strdup(optarg);
^
main.c:128:26: note: include the header <string.h> or explicitly provide a declaration for 'strdup'
main.c:145:6: error: use of undeclared identifier 'stderr'
VIRGIN_PWTYPE;
^
main.c:104:13: note: expanded from macro 'VIRGIN_PWTYPE'
fprintf(stderr, "Conflicting password source\n");
^
main.c:148:26: warning: implicit declaration of function 'getenv' is invalid in C99 [-Wimplicit-function-declaration]
args.pwsrc.password=getenv("SSHPASS");
^
main.c:148:25: warning: incompatible integer to pointer conversion assigning to 'const char *' from 'int' [-Wint-conversion]
args.pwsrc.password=getenv("SSHPASS");
^~~~~~~~~~~~~~~~~~
main.c:150:25: error: use of undeclared identifier 'stderr'
fprintf(stderr, "sshpass: -e option given but SSHPASS environment variable not set\n");
^
main.c:170:6: warning: implicitly declaring library function 'exit' with type 'void (int) attribute((noreturn))' [-Wimplicit-function-declaration]
exit(0);
^
main.c:170:6: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'
main.c:218:14: warning: implicit declaration of function 'posix_openpt' is invalid in C99 [-Wimplicit-function-declaration]
masterpt=posix_openpt(O_RDWR);
^
main.c:221:2: warning: implicit declaration of function 'perror' is invalid in C99 [-Wimplicit-function-declaration]
perror("Failed to get a pseudo terminal");
^
main.c:228:9: warning: implicit declaration of function 'grantpt' is invalid in C99 [-Wimplicit-function-declaration]
if( grantpt( masterpt )!=0 ) {
^
main.c:233:9: warning: implicit declaration of function 'unlockpt' is invalid in C99 [-Wimplicit-function-declaration]
if( unlockpt( masterpt )!=0 ) {
^
main.c:246:22: warning: implicit declaration of function 'ptsname' is invalid in C99 [-Wimplicit-function-declaration]
const char *name=ptsname(masterpt);
^
main.c:246:17: warning: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Wint-conversion]
const char *name=ptsname(masterpt);
^ ~~~~~~~~~~~~~~~~~
main.c:287:18: warning: implicit declaration of function 'rpl_malloc' is invalid in C99 [-Wimplicit-function-declaration]
char **new_argv=malloc(sizeof(char )(argc+1));
^
./config.h:155:16: note: expanded from macro 'malloc'
#define malloc rpl_malloc
^
main.c:287:9: warning: incompatible integer to pointer conversion initializing 'char **' with an expression of type 'int' [-Wint-conversion]
char **new_argv=malloc(sizeof(char )(argc+1));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:392:17: error: use of undeclared identifier 'stderr'
fprintf(stderr, "SSHPASS searching for password prompt using match "%s"\n", compare1);
^
main.c:398:17: error: use of undeclared identifier 'stderr'
fprintf(stderr, "SSHPASS read: %s\n", buffer);
^
main.c:407:25: error: use of undeclared identifier 'stderr'
fprintf(stderr, "SSHPASS detected prompt. Sending password.\n");
^
main.c:414:25: error: use of undeclared identifier 'stderr'
fprintf(stderr, "SSHPASS detected prompt, again. Wrong password. Terminating.\n");
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
16 warnings and 20 errors generated.
make[1]: *** [main.o] Error 1
make: *** [all] Error 2
[I] kylix3511@kylix3511.com.local~/D/t/sshpass>

@highfei2011

This comment has been minimized.

Copy link

@highfei2011 highfei2011 commented Dec 4, 2018

@sandipb

This comment has been minimized.

Copy link

@sandipb sandipb commented Jan 18, 2019

FYI, before installing, always look at the formula source to confirm that the download URL is still pointing to an authoritative archive.

@jsepeta1

This comment has been minimized.

Copy link

@jsepeta1 jsepeta1 commented Jan 23, 2019

My errors:
Error: Your Xcode (1) is too outdated.
Please update to Xcode 9.2 (or delete it).
(I'm running the latest version, 10.1)

Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.

@dasgoll

This comment has been minimized.

Copy link

@dasgoll dasgoll commented Jan 28, 2019

Worked like a charm on macOs Sierra (10.12.6)

brew install http://git.io/sshpass.rb

@singhania

This comment has been minimized.

Copy link

@singhania singhania commented Mar 1, 2019

sshpass is installed but not able to login.

@chilicheech

This comment has been minimized.

Copy link

@chilicheech chilicheech commented Mar 8, 2019

That formula should be updated to use https instead of http for security purposes.

@rungatgenapsys

This comment has been minimized.

Copy link

@rungatgenapsys rungatgenapsys commented Mar 29, 2019

Worked perfectly using brew on Mojave. Thanks!

@fuzheng1998

This comment has been minimized.

Copy link

@fuzheng1998 fuzheng1998 commented May 11, 2019

Screen Shot 2019-05-11 at 20 51 58

maybe brew won't allow us to install
@AlJohri

This comment has been minimized.

Copy link

@AlJohri AlJohri commented Jun 25, 2019

Worked like a charm on macOs Sierra (10.12.6)

brew install http://git.io/sshpass.rb

Thank you! brew install http://git.io/sshpass.rb worked like a charm for me as well on Mojave.

@iMuFeng

This comment has been minimized.

Copy link

@iMuFeng iMuFeng commented Nov 18, 2019

Upgrade sshpass version:

brew install https://gist.githubusercontent.com/iMuFeng/6f43c659bb9bdbeda42ed6c101814f76/raw/25807699e855570c19fe1ff7e2bb7c945939c62b/sshpass.rb
@sandeepk24

This comment has been minimized.

Copy link

@sandeepk24 sandeepk24 commented Nov 23, 2019

==> ./configure --prefix=/usr/local/Cellar/sshpass/1.06
Last 15 lines from /Users/sgoru/Library/Logs/Homebrew/sshpass/01.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... clang
checking whether the C compiler works... no
configure: error: in /private/tmp/sshpass-20191123-30126-1yfifhd/sshpass-1.06': configure: error: C compiler cannot create executables See config.log' for more details

Not working for mojave

@esolitos

This comment has been minimized.

Copy link

@esolitos esolitos commented Dec 15, 2019

If anybody cares i created a brew tap to provide it:

$ brew tap esolitos/ipa
$ brew install sshpass

Done. 😊

@sandeepk24

This comment has been minimized.

Copy link

@sandeepk24 sandeepk24 commented Dec 19, 2019

==> ./configure --prefix=/usr/local/Cellar/sshpass/1.06
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... clang
checking whether the C compiler works... no
configure: error: in /private/tmp/sshpass-20191219-16142-13zem8h/sshpass-1.06': configure: error: C compiler cannot create executables See config.log' for more details

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/esolitos/homebrew-ipa/issues

@drugolega

This comment has been minimized.

Copy link

@drugolega drugolega commented Jan 22, 2020

nice
Thx

@ljmocic

This comment has been minimized.

Copy link

@ljmocic ljmocic commented Mar 27, 2020

@eslitos thank you, worked like a charm!

@mahmoudshirivaramini

This comment has been minimized.

Copy link

@mahmoudshirivaramini mahmoudshirivaramini commented Jun 9, 2020

Just use brew
$brew install http://git.io/sshpass.rb

It works on macOS Catalina 10.15.5.

@vladget

This comment has been minimized.

Copy link

@vladget vladget commented Jun 12, 2020

Right, it is really works on Catalina

@smartwatermelon

This comment has been minimized.

Copy link

@smartwatermelon smartwatermelon commented Jun 15, 2020

As of homebrew version 2.4, installing via direct URL results in the following on brew doctor

$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed formulae were deleted!
You should find replacements for the following formulae:
  sshpass

But the tap kindly provided by @esolitos works around this issue by installing in the Homebrew-supported method. Thanks!

@DanBurkhardt

This comment has been minimized.

Copy link

@DanBurkhardt DanBurkhardt commented Jun 17, 2020

As of homebrew version 2.4, installing via direct URL results in the following on brew doctor

$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed formulae were deleted!
You should find replacements for the following formulae:
  sshpass

But the tap kindly provided by @esolitos works around this issue by installing in the Homebrew-supported method. Thanks!

killer! thanks friends.

I put together a little script to get me going on this now and for future installations.

Sharing is caring!

Install "sshpass" on macOS Catalina with my gist: install-sshpass.sh

@rjmaomao

This comment has been minimized.

Copy link

@rjmaomao rjmaomao commented Sep 8, 2020

Hello, I am new to this. I want to install sshpass for ansible usage. I first created the formula

$ brew create https://sourceforge.net/projects/sshpass/files/sshpass/1.06/sshpass-1.06.tar.gz --force

Then install sshpass failed with Error: Empty installation.
$ brew install sshpass
==> Downloading https://sourceforge.net/projects/sshpass/files/sshpass/1.06/sshpass-1.06.tar.gz
Already downloaded: /Users/renjing/Library/Caches/Homebrew/downloads/53e23c753c814ca762621b4d0e73b5fc21ff548e7b31d38ef31d9a7d8ca6eee0--sshpass-1.06.tar.gz
==> ./configure --prefix=/usr/local/Cellar/sshpass/1.06
Error: Empty installation

I also tried command provided in above comment,
$ brew install https://raw.githubusercontent.com/kadwanev/bigboybrew/master/Library/Formula/sshpass.rb
Error: Calling Non-checksummed download of sshpass formula file from an arbitrary URL is disabled! Use 'brew extract' or 'brew create' and 'brew tap-new' to create a formula file in a tap on GitHub instead.

$ brew install http://git.io/sshpass.rb
Error: Calling Non-checksummed download of sshpass formula file from an arbitrary URL is disabled! Use 'brew extract' or 'brew create' and 'brew tap-new' to create a formula file in a tap on GitHub instead.

Used brew doctor and saw sshpass.rb as uncommitted.
Warning: You have uncommitted modifications to Homebrew/homebrew-core.
If this is a surprise to you, then you should stash these modifications.
Stashing returns Homebrew to a pristine state but can be undone
should you later need to do so for some reason.
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core && git stash && git clean -d -f

Uncommitted files:
?? Formula/sshpass.rb

Could you please give me some advise on how could I install sshpass successfully? Thanks!

@esolitos

This comment has been minimized.

Copy link

@esolitos esolitos commented Sep 8, 2020

Hi @rjmaomao, you can try using the tap i created for this:

If anybody cares i created a brew tap to provide it:

$ brew tap esolitos/ipa
$ brew install sshpass

Done.

@rjmaomao

This comment has been minimized.

Copy link

@rjmaomao rjmaomao commented Sep 8, 2020

Hi @rjmaomao, you can try using the tap i created for this:

If anybody cares i created a brew tap to provide it:

$ brew tap esolitos/ipa
$ brew install sshpass

Done.

Hi @esolitos , I didn't expect to receive an answer so quickly, thank you very much. I found an article from google mentioned following tap, tried it and worked. I guess should be same as the tap you created? May I ask how can I upgrade sshpass if I installed it through tap and there's new version ?

Some years have passed and there is now a proper Homebrew Tap for sshpass, maintained by Aleks Hudochenkov. To install sshpass from this tap, run:
brew install hudochenkov/sshpass/sshpass

@davidcsi

This comment has been minimized.

Copy link

@davidcsi davidcsi commented Sep 8, 2020

brew tap esolitos/ipa
brew install sshpass

Hello, this gives me:

david$ brew tap esolitos/ipa
 david$ brew install sshpass
==> Downloading https://sourceforge.net/projects/sshpass/files/sshpass/1.05/sshpass-1.05.tar.gz
Already downloaded: /Users/david/Library/Caches/Homebrew/downloads/607fb753141f21319acf1a2f676c82cb298652150b34df6c935ae7a4fcd43661--sshpass-1.05.tar.gz
==> ./configure --prefix=/usr/local/Cellar/sshpass/1.05
Error: Empty installation
@esolitos

This comment has been minimized.

Copy link

@esolitos esolitos commented Sep 8, 2020

@davidcsi I have no idea why you're getting the 1.05 version because in my esolitos/ipa tap I am referencing version 1.06 (ref).

You probably have multiple taps providing sshpass, you could try with brew install esolitos/ipa/sshpass to get it from my tap.

@dhtml

This comment has been minimized.

Copy link

@dhtml dhtml commented Oct 4, 2020

MAC OSX Catalina
Version: 10.15.6

brew tap esolitos/ipa
brew install sshpass
Gave me an empty installation.

However, this one below works
$ brew install esolitos/ipa/sshpass

Thanks

@fgardavaud

This comment has been minimized.

Copy link

@fgardavaud fgardavaud commented Oct 13, 2020

Install failed same to previous users with the recommended command line :
brew install https://raw.githubusercontent.com/kadwanev/bigboybrew/master/Library/Formula/sshpass.rb

Error: Calling Non-checksummed download of sshpass formula file from an arbitrary URL is disabled! Use 'brew extract' or 'brew create' and 'brew tap-new' to create a formula file in a tap on GitHub instead.

But @esolitos 🥇 save my working day. Thank you very much for your work.
this command line work for me (macOS 10.15.7, no choice in a new mac 👎 )
$ brew install esolitos/ipa/sshpass

@esolitos

This comment has been minimized.

Copy link

@esolitos esolitos commented Oct 16, 2020

Interesting, it's 2 people which had the same issue. I opened an issue report: esolitos/homebrew-ipa#1

Would be nice if @dhtml and @davidcsi could help me out there.
You could check if you have multiple taps providing the same formula.

@alozano-77

This comment has been minimized.

Copy link

@alozano-77 alozano-77 commented Oct 17, 2020

@esolitos jumping in and tried your solution with a new error

brew tap esolitos/ipa
brew install sshpass

Error: Permission denied @ apply2files - /usr/local/lib/node_modules/serverless/node_modules/term-size/vendor/macos/.DS_Store

Edit: seems like it didn't cause any problems. Trying to retap and install results in Warning: esolitos/ipa/sshpass 1.06 is already installed and up-to-date so likely good to go. Thanks for the help

@esolitos

This comment has been minimized.

Copy link

@esolitos esolitos commented Oct 17, 2020

@dhtml

This comment has been minimized.

Copy link

@dhtml dhtml commented Oct 17, 2020

I support using brew doctor, I never ran into this type of error.

Let me run this again right now, Now I am on Mac OSX Catalina, 10.15.7

tony@Cathy ~ % brew uninstall sshpass
Uninstalling /usr/local/Cellar/sshpass/1.06... (9 files, 78.0KB)
tony@Cathy ~ % brew install sshpass
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask-versions).
==> Updated Casks
affinity-designer-beta

==> Downloading https://sourceforge.net/projects/sshpass/files/sshpass/1.05/sshpass-1.05.tar.gz
==> Downloading from https://liquidtelecom.dl.sourceforge.net/project/sshpass/sshpass/1.05/sshpass-1.05.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/sshpass/1.05
Error: Empty installation
tony@Cathy ~ % brew install esolitos/ipa/sshpass
==> Installing sshpass from esolitos/ipa
==> Downloading https://sourceforge.net/projects/sshpass/files/sshpass/1.06/sshpass-1.06.tar.gz
Already downloaded: /Users/tony/Library/Caches/Homebrew/downloads/53e23c753c814ca762621b4d0e73b5fc21ff548e7b31d38ef31d9a7d8ca6eee0--sshpass-1.06.tar.gz
==> ./configure --prefix=/usr/local/Cellar/sshpass/1.06
==> make install
🍺 /usr/local/Cellar/sshpass/1.06: 9 files, 78.0KB, built in 11 seconds
Removing: /Users/tony/Library/Caches/Homebrew/sshpass--1.05.tar.gz... (96KB)

Let me show of my environment variables:
tony@Cathy ~ % node -v
v14.12.0
tony@Cathy ~ % npm -v
6.14.8
tony@Cathy ~ % sw_vers
ProductName: Mac OS X
ProductVersion: 10.15.7
BuildVersion: 19H2

@esolitos

This comment has been minimized.

Copy link

@esolitos esolitos commented Oct 17, 2020

@dhtml

This comment has been minimized.

Copy link

@dhtml dhtml commented Oct 18, 2020

Okay here is the tap:
tony@Cathy ~ % brew tap
esolitos/ipa
exolnet/deprecated
heroku/brew
homebrew/cask
homebrew/cask-versions
homebrew/core
homebrew/services

tony@Cathy ~ % brew --version
Homebrew 2.5.6-67-gaa97179
Homebrew/homebrew-core (git revision a5a91; last commit 2020-10-17)
Homebrew/homebrew-cask (git revision a9119; last commit 2020-10-17)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.