I have a simple use case, I want to pass a password phrase to a command that requires keyboard input:
sshuttle -r user@server_address 0.0.0.0/0
this command will prompt for user input of sudo password of my Mac,
but I want to pass the password to it, instead of entering it everytime, I have tried:
echo "password" | sshuttle -r user@server_address 0.0.0.0/0
but not work, it still prompt for the password
ssh
underneath, it should be able to use your SSH daemon that holds your private key. This is the standard way to do passwordless SSH. See e.g. https://unix.stackexchange.com/questions/30901 https://unix.stackexchange.com/questions/72552 – Kusalananda Sep 05 '20 at 07:12expect
tool in some cases it should help https://linux.die.net/man/1/expect https://www.thegeekstuff.com/2010/10/expect-examples/ – Marek Lisiecki Sep 05 '20 at 22:08