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
@adaptabi

This comment has been minimized.

adaptabi 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.

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.

kadwanev commented Apr 17, 2015

@arunoda

This comment has been minimized.

Owner

arunoda commented May 5, 2015

Thanks @kadwanev
Updated.

@tawanda

This comment has been minimized.

tawanda commented Sep 18, 2015

Thanks mate

@gil-andre

This comment has been minimized.

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.

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.

qunwang6 commented Aug 31, 2016

how to build for ios?

@judge2020

This comment has been minimized.

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.

sparkmuse commented Sep 14, 2016

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

@lukesUbuntu

This comment has been minimized.

lukesUbuntu commented Sep 20, 2016

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

@bostondevin

This comment has been minimized.

bostondevin commented May 11, 2017

yum install sshpass worked for me

@chusiang

This comment has been minimized.

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.

sfblaauw commented Jun 24, 2017

@lukesUbuntu works form me! Thanks

@FranciscoGutierrez

This comment has been minimized.

FranciscoGutierrez commented Feb 8, 2018

does this work zshell?

@johannesjo

This comment has been minimized.

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.

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.

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.

zh-f commented Apr 16, 2018

@lukesUbuntu It really helps! Thanks!

@Evgeniy-Odesskiy

This comment has been minimized.

Evgeniy-Odesskiy commented May 10, 2018

@lukesUbuntu works form me! Thanks!

@shizhongping

This comment has been minimized.

shizhongping commented Jun 8, 2018

@lukesUbuntu Thanks, saved my time.

@kylix3511

This comment has been minimized.

kylix3511 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$

@kylix3511

This comment has been minimized.

kylix3511 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$

@kylix3511

This comment has been minimized.

kylix3511 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$

@kylix3511

This comment has been minimized.

kylix3511 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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment