Last active
October 23, 2025 09:31
-
-
Save henri/bdcb2fe95ccccb90b12394287f86ba11 to your computer and use it in GitHub Desktop.
ssh tunnel cheatsheet
This file contains hidden or 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
| # | |
| # ssh using the -N falg for establishing a tunnel is great.... but somtimes it is difficult to know if authentication has | |
| # been successful (especially if you have any kind of extended login delays setup on a remote system) and you are | |
| # authenticating with a password (did I type that correctly). | |
| # | |
| # this approach requires little additional setup and prevents lots of verbosity regarding the login. | |
| # | |
| # recive notification that authentication succeeded - bash | |
| ssh -v <user>@<remote-host> -p <port> -L <localport>:<tunnel-host>:<remoteport> -N 2> >(grep Authenticated >&2) | |
| # recive notification that authentication succeeded - fish | |
| ssh -v <user>@<remote-host> -p <port> -L <localport>:<tunnel-host>:<remoteport> -N 2>| grep Authenticated | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment