/ Published in: Bash
Scenario:
- You are at home and you want to access your development server (
mydevbox) at your company viassh. - You can't access the machine directly due to the company firewall which allows external access to only a dedicated gateway host (
gateway).
The script below allows you to ssh directly to your dev box by piping the data stream through the gateway. Just save it in /usr/bin/sssh and use sssh mydevbox whenever you're not behind the gateway. Also works with scp, just replace ssh with scp in the script. You must have nc or netcat installed on the gateway.
Expand |
Embed | Plain Text
ssh -oproxycommand="ssh -q gateway nc %h %p" $*
You need to login to post a comment.
