Giter Club home page Giter Club logo

passh's Issues

Usage Example on Travis-CI

Hi @clarkwang! โ˜€๏ธ
I am attempting to use passh to input the password for an RSA key on Travis-CI.
The passh.c compiles successfully, but when I try to use passh in an ssh command,
it still asks me for the password! ๐Ÿ˜ž
please see: https://travis-ci.org/nelsonic/hello-world-node-http-server/builds/384184242#L458
image

The password for the SSH key is loaded as an environment variable SSH_ASKPASS
but for some reason it is not being "piped" into the ssh command.

What am I doing wrong?

Any help much appreciated. (thanks!)

Thank your very much for this program!

Just saying thanks!

I also would like to share that I can use this for more than just inputting the password. For exemple, for unison, I could use this to both enter the password and answer yes to the question Proceed with propagating updates with the unison bidirecional sync tool:

  1. passh -P 'Proceed with propagating updates' -p y passh -P '[Pp]assword: \{0,1\}$' -p password unison ...

unison has the builtin option called -batch to answer yest to this question Proceed with propagating updates, but I had to manually answer yes because the -batch option also implies to ignore conflict and fail silently. But I would not like for it to fail silently, but ask for my input. Then, putting passh to answer y to the input question Proceed with propagating updates fixed my problem because when there is a conflict, y is not a valid answer (but f, <, etc).

Do not feed stdin until interactive

Hey!

When connecting with ssh and a key, you can start typing stuff while authenticating and this will be provided to the next process listening to stdin. When using passh, what is received on stdin seems to be transmitted to the remote end even when not interactive yet. Would it be possible to avoid this?

Need help in compiling for openwrt

Hi,
Can someone help me with compiling passh for openwrt? (I never ever compiled something :-) )
And need passh for my micro wrt router (GL-AR750S)
Iam on OpenWrt 18.06.1, r7258-5eb055306f and installed "make" but it can't find "cc command".

Which is the best method for newbies to compile?

Maybe it's pssible that you can create a "compiled release" here??

best regards

Add support for ERE?

Like grep -E.

Not sure if REG_EXTENDED is always defined on all systems. Can use #ifdef.

big -C option is broken by design

Problem definition: Maybe it waits (N+1)'s password prompt, but if no password prompt (or less than (N+1)), then it cause successful ssh program start and infinite waiting block.

How to reproduce: Just try to start, e.g. when there is already public keys, or other variant when no password prompt.

wont compile in freebsd

Hi, I had problems with sshpass in freebsd, so I thought i'd give passh a try.

I need to rsync data from a nas to a freebsd machine. Use of ssh keys is disabled, as a lot of other stuff as well. (Avoid Seagate if you're buying a nas.)

However, I get an error when trying to compile.

$ make
cc -O2 -pipe  passh.c  -o passh
passh.c:805:49: warning: implicit conversion from 'int' to 'char' changes value from 255 to -1 [-Wconstant-conversion]
                            cache[ncache + i] = 255;
                                              ~ ^~~
passh.c:963:20: error: use of undeclared identifier 'SIGWINCH'
        sig_handle(SIGWINCH, sig_winch);
                   ^
1 warning and 1 error generated.
*** Error code 1

AIX compile error

I tried compiling passh on AIX 7.2.0.0 with gcc-8.3.0 on ppc64le

It fails with the following:

$ diff -u Makefile Makefile.new
--- Makefile    2020-03-20 05:37:40.000000000 +0200
+++ Makefile.new        2020-05-19 10:55:45.000000000 +0200
@@ -1,5 +1,6 @@

 .PHONY: all clean
+ CC = gcc

 all: passh
$ make
        gcc -O  passh.c -o passh
passh.c:359:18: warning: 'struct winsize' declared inside parameter list will not be visible outside of this definition or declaration
     const struct winsize *slave_winsize)
                  ^~~~~~~
passh.c: In function 'pty_fork':
passh.c:410:17: warning: implicit declaration of function 'ioctl' [-Wimplicit-function-declaration]
             if (ioctl(fds, TIOCSWINSZ, slave_winsize) < 0)
                 ^~~~~
In file included from passh.c:46:
passh.c:410:28: error: invalid application of 'sizeof' to incomplete type 'struct winsize'
             if (ioctl(fds, TIOCSWINSZ, slave_winsize) < 0)
                            ^~~~~~~~~~
passh.c: In function 'big_loop':
passh.c:727:28: error: storage size of 'ttysize' isn't known
             struct winsize ttysize;
                            ^~~~~~~
In file included from passh.c:46:
passh.c:739:31: error: invalid application of 'sizeof' to incomplete type 'struct winsize'
             if (ioctl(ourtty, TIOCGWINSZ, &ttysize) == 0) {
                               ^~~~~~~~~~
passh.c:740:34: error: invalid application of 'sizeof' to incomplete type 'struct winsize'
                 ioctl(g.fd_ptym, TIOCSWINSZ, &ttysize);
                                  ^~~~~~~~~~
passh.c: In function 'main':
passh.c:928:20: error: storage size of 'size' isn't known
     struct winsize size;
                    ^~~~
In file included from passh.c:46:
passh.c:941:33: error: invalid application of 'sizeof' to incomplete type 'struct winsize'
         if (ioctl(STDIN_FILENO, TIOCGWINSZ, (char *) &size) < 0)
                                 ^~~~~~~~~~
make: 1254-004 The error code from the last command is 1.


Stop.
$ grep -Hnr winsize /usr/include/
/usr/include/netiso/tp_pcb.h:226:#define        tp_winsize _tp_param.p_winsize
/usr/include/netiso/tp_user.h:75:       short   p_winsize;
/usr/include/sys/ioctl.h:96:struct winsize {
/usr/include/sys/ioctl.h:356:#define    TIOCGWINSZ      _IOR('t', 104, struct winsize)  /* get window size */
/usr/include/sys/ioctl.h:357:#define    TIOCSWINSZ      _IOW('t', 103, struct winsize)  /* set window size */

sshpass-1.06 does compile when I add #undefine malloc to config.h.

As mentioned in README.md, sshpass is broken, and I experience it on AIX. sshpass only works intermittently. I'm hoping to give passh a try, but both sexpect and passh does not compile unfortunately, and is not available on AIX Toolbox for Linux Applications. passh does work and compile perfectly on a x86_64 Linux instance.

Thank you

hide password prompt...

hi,
is it possibile to hide the password prompt just like sshpass does?
this is kind of an issue mostly when redirecting command output...
example:

$ passh -p password user@host pwd > out
$ cat out
user@host's password:
/home/user
$
$ sshpass -p password user@host pwd > out
$ cat out
/home/user

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.