Guest User

Untitled

a guest
Jul 18th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. : ${user:=${1:-$USER}}
  4. : ${host:=${2}}
  5. : ${sshport:=${3:-22}}
  6. : ${localport:=${4}}
  7. : ${remoteport:=${5}}
  8. : ${remotehost:=${6:-localhost}}
  9.  
  10. echo "Tunneling to ${remotehost} via ${user}@${host}:${sshport} : ${localport} --> ${remoteport}"
  11. ssh -p${sshport} -N -L *:${localport}:${remotehost}:${remoteport} ${user}@${host}
Add Comment
Please, Sign In to add comment