Prior to installing MacPorts
- First install XCode. I installed the latest XCode distribution (4.4.1) via the App Store
- Open up XCode, agree with the EULA.
- Install the XCode Command Line Tools. These need to be installed seperately by going to XCode Preferences > Downloads, find the Command Line Tools item and click on the install button.
Install MacPorts
- Download the MacPorts MacOS Package installer.
- Update MacPorts by running the following command in Terminal: sudo port selfupdate. For more optional checks, go to http://guide.macports.org/#using
Install and configure Corkscrew
- In Terminal, run the following command: sudo port install corkscrew
- Create an authentication credentials file (just a text file with your proxy username and password, to stop you having to type it each time you connect): ~/.ssh/proxy_credentials. It should contain just one line, like this: username:password
- Next, in your ~/.ssh/config (create the file if it doesn’t already exist), add the following to make ssh use corkscrew by default for ssh connections (all one line): ProxyCommand corkscrew your.local.proxy port %h %p ~/.ssh/proxy_credentials
Optional config:
- In your ~/.ssh/config, add the following at the top to let SSH just use Corkscrew for specific hosts: Host external.com example.com
- With this config, I use "#" to switch Corkscrew on and off when needed:
Host *
ProxyCommand corkscrew your.local.proxy port %h %p ~/.ssh/proxy_credentials
#ProxyCommand none
That should be enough – you should now be able to connect to your remote server by typing:
ssh -p 443 you@your.ssh.server
0 reacties:
Post a Comment