![]() ![]() A great way for Apple Admins to become smart is to master as many commands as possible. In a world of endless possibilities where everyone seeks to work smarter not harder, IT and system admins cannot afford to be left behind. ![]() Now call autossh with -M 0 option (monitoring disabled) and ready to go:Īutossh -Nf -M 0 even bother to type on reboot/login which does not happen so often on my own MacBook anyway.This article is the first in our series on the common Unix commands every Mac admin must know. The standard https proxy port is 3128, you might have to adjust it. ![]() I comment out the Prox圜ommand when at home and remove the comment # when at work. # Prox圜ommand nc -X connect -x 3128 %h %p ssh/config file (if it does not exist, create it with Textedit or nano). Anyway: the autossh man page recommends ssh’s monitoring capability through the tunnel itself as the better solution.Īnother point autossh honours ssh_config, so port forwarding, monitoring and proxy handling can be included in the. My situation is that sometimes I use the ssh tunnel behind a corporate https firewall and there the monitoring port is blocked (anything but 443 of course). Beautiful undistracting layout / blog theme, too. The latest version is autossh-1.4b at the time of this writing, so adjust the commands as necessary. Normally you would just use wget, but Mac OS X doesn’t seem to come with it pre-installed.Įxtract the source code, compile, and install it. So here we go.įirst, download the latest version of autossh. However, you can do whatever you desire with the source after installation. Should I ever need to recompile or reinstall, the source is readily available. Personally, I like to keep the source code of compiled programs in my home directory, for example, ~/sources. However, I’ll reproduce them here for clarity’s sake. Otherwise, compiling autossh is straightforward, especially since the exact build commands are provided on the website. Setup of autossh is as simple as sudo port install autossh if you’re using Mac Ports. I will always be surfing the web on a secure connection without having to give it a second thought. Once setup, everytime the tunnel is lost or I move to a new network, the connection will be re-established without having to lift a finger. The purpose of autossh is to start an SSH connection, monitor it, and restart it if necessary. ![]() I posted a short tutorial on automating SSH logins using public key authentication that you can reference if needed. In order for this process to work without any user interaction, you will need to setup a public/private key so that you can log in via SSH without a password. So, like every good lazy programmer, I looked for a way to automate this process. Re-establishing this tunnel on every move quickly becomes tiring. As a busy student on the go, I routinely jump from one wifi hotspot to the next. So, whenver I’m on an untrusted network I will setup an SSH tunnel to my remote server for additional security. The https and padlock just aren’t good enough for me anymore. After snooping network traffic at various public wifi hotspots (for academic purposes) I have become a more paranoid web surfer. Anything that is not transferred through a secured connection is publicly visible. Using public networks for sensitive online communication is inherently risky. ![]()
0 Comments
Leave a Reply. |