![]() ![]() Of course, you can choose whatever alias name you like. Add the following to your local ~/.bash_profile: alias open-tunnel='ssh -f -N -R 10022:localhost:22 ' To make the command easier on yourself, you can add an alias in your bash profile. You'll need to run that once after you log in. Replace the brackets with your username and machine name. I chose 10022 because it's similar to ssh's default port of 22. The remote port can be anything you want, but you should choose a port > 1024 to avoid conflicts and so you don't have to be root. Anything contacting the remote machine on port 10022 will be sent to port 22 on your local computer. The -R flag binds a port on the remote computer to a port on your local computer. The -f and -N flags put ssh into the background and leave you on your machine. To set up the ssh tunnel, you need to run a command on your local machine like: ssh -f -N -R 10022:localhost:22 You need to be able to ssh from local to remote to run the commands, and you need to be able to ssh from remote to local so it can send commands to TextWrangler.
0 Comments
Leave a Reply. |