clarkwang / passh Goto Github PK
View Code? Open in Web Editor NEW๐ฌ๐ฌ๐ก๐ฉ๐๐ฌ๐ฌ is ๐๐๐๐๐๐ by design
License: GNU General Public License v3.0
๐ฌ๐ฌ๐ก๐ฉ๐๐ฌ๐ฌ is ๐๐๐๐๐๐ by design
License: GNU General Public License v3.0
I read the readme , but can't find any mention for the argument of port :)
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
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.
Any help much appreciated. (thanks!)
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:
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).
Hi!
Just wanted to let you know that passh is now available as a package on FreeBSD: https://www.freshports.org/security/passh
Currently, we are just using the date of the last commit as a version number. I'll gladly switch to a real version if you decide to create a tag one day.
Cheers!
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?
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
Like grep -E
.
Not sure if REG_EXTENDED
is always defined on all systems. Can use #ifdef
.
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.
Hello,
Passh is very usefull, with it I can easly "have a tty in a webshell". ๐
I want to use it to write "passh scripts", so I published a little project to help to write this "passh scripts" :
Thanks for passh ๐
sshpass is quite happy with pipes, as mentioned in README.md.
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
I am trying to package passh
to NixOS but the fact that there is no license is a bit scary, and makes it hard for this to be merged.
Could you please choose a license?
Thank you!
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
Accidentally discovered it with:
$ passh -p file:~/.ssh/pass.bastion ssh host.domain.tld
But it seems passh doesn't expand ~
. So on the full path it worked, but once provided a non-existing path to the file it crashed.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.