{"repo":"clarkwang/passh","free":true,"listed":false,"github":"https://github.com/clarkwang/passh","clone":"git clone https://github.com/clarkwang/passh.git","description":"𝐬𝐬𝐡𝐩𝐚𝐬𝐬 is 𝒃𝒓𝒐𝒌𝒆𝒏 by design","language":"C","stars":246,"topics":["sshpass","ssh","automation"],"license":"GPL-3.0","category":"workflow-automation","readme_excerpt":"passh NOTE: The pty related code is stolen from the [APUE book][apue]. [apue]: http://www.apuebook.com/ compile $ cc -o passh passh.c $ cp -v passh /usr/bin/ $ passh -h usage supported platforms Tested on: OpenWRT 15.05.1, ramips/mt7620 (on [Newifi Mini, or Lenovo Y1 v1][newifi]) Debian Linux 8, x86 64 (Jessie) macOS 10.12 (Sierra) Cygwin, x86 64 (on Windows 7) FreeBSD 11.1, x86 64 AIX 7.2, ppc64le (added in issue #7) [newifi]: https://wiki.openwrt.org/toh/lenovo/lenovo y1 v1 why i wrote passh 1. I got a Newifi Mini router and installed OpenWRT on it. I want the router to be my SOCKS proxy so I run ssh -D 8888 user@host automatically at boot time but the SSH server only supports password auth. On Linux I would use Expect to automate ssh but OpenWRT does not install Expect by default and my router does not have enough storage for the extra Tcl and Expect packages. 1. Then I tried [ sshpass ][sshpass] but sshpass seems more like a nice hack and it's broken by design. See following example on a Linux system: $ tty /dev/pts/18 // now we're on pts/18 $ sshpass bash --norc bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell bash-4.4# tty /dev/pts/18 // the bash's stdin is also connected to pts/18 bash-4.4# ps p $$ PID TTY STAT TIME COMMAND 37151 pts/36 Ss+ 0:00 bash --norc // but the controlling terminal is pts/36 bash-4.4# ps t pts/36 PID TTY STAT TIME COMMAND 37151 pts/36 Ss+ 0:00 bash --norc 37154 pts/36 R+ 0:00 ps t pt","default_branch":null,"files":null,"tree":[],"storefront":"/r/clarkwang","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/clarkwang/passh/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}