Skip to content

Instantly share code, notes, and snippets.

@dhcmrlchtdj
Created August 22, 2016 06:09
Show Gist options
  • Select an option

  • Save dhcmrlchtdj/4234c1818ad54c24d0445b2b3afa8be1 to your computer and use it in GitHub Desktop.

Select an option

Save dhcmrlchtdj/4234c1818ad54c24d0445b2b3afa8be1 to your computer and use it in GitHub Desktop.
# forward f port remote-port remote-host
# forward c port remote-port remote-host
forward() {
case "$1" in
"f") ssh -v -O forward -R $3:localhost:$2 $4 ;;
"c") ssh -v -O cancel -R $3:localhost:$2 $4 ;;
esac
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment