Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- clear
- # This will allow you to tunnel into a host and access the router's
- # web admin panel without having to enable remote access.
- #
- # How to create a shortcut...
- #
- # Target: C:\cygwin\bin\bash.exe --login -c "/cygdrive/c/Users/J2897/Code/Bash/tunnel_router.bash"
- # Start in: C:\cygwin\bin
- ssh -i "$(cygpath "$USERPROFILE\Keys\Alfa\id_rsa")" -N -L 9000:192.168.0.1:80 -o "ExitOnForwardFailure yes" -p 22 J2897@example.org &
- PID=$!
- cygstart "$(cygpath "C:\Program Files\Google\Chrome\Application\chrome.exe")" --profile-directory=Default --incognito http://127.0.0.1:9000/
- read -n1 -r -p "Press any key to close the tunnel..."
- kill $PID
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement