Created
October 31, 2018 18:35
-
-
Save jfilter/8f64f52736237b8693b075016c538897 to your computer and use it in GitHub Desktop.
Tunnel SSH with additional password prompt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect -f | |
set timeout -1 | |
spawn -ignore HUP ssh -N -f -L localhost:8888:localhost:8888 <some ssh connection> | |
expect "<this depends on the promp> password:" | |
send "mypassword\r" | |
interact |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment