Text is Best and other Remote Access Tricks
Posted on October 18th, 2011 in Linux/Unix, Windows | No Comments »
No no, that’s not “txt” as in OMG – LOL – BFD txting; but rather my return to the romance of the CLI. Don’t get me wrong – I never stopped appreciating the unadulterated power of the command line, it’s just taken my need to leverage outbound SSH from multiple locked down networks to fully embrace the simple elegance of my home server ala putty.
Challenge – IMAP access from a restricted network
As I’m increasingly, “taking my show on the road”, I sometimes find myself in work enviormnets with limited, blocked or proxy access to the outside world (DAMN you PROXY!! – but that is a topic for another day.) Solution, get connected to my home server and connect to fire-walled resources from there. On a recent engagement I found that while most outbound traffic was allowed, IMAP was not. Web and SSH were being passed however; so in concept, the solution is basic enough – make an SSH connection to my home server, and run an IMAP client from there.
Already having an Mint Linux server (loves me some Mint), setup primarily for file serving, I simply opened SSH port 22 to the outside world. After connecting via Putty I required a textual mail client that would support IMAP. I’ll be honest, it’s been years since I’ve used PINE, so I was a bit unaware of what other CLI email clients are out there – fortunately I discovered “MUTT” – http://mutt.sourceforge.net/
Mutt can be a bit intimidating. While easy to install, like most Debian packages (sudo apt-get install mutt), the “Devil in the details”, is the not included by default, .muttrc config file. Yes you can read the project wiki or grab a sample one from others, but I found a web based automated builder tool – http://www.muttrcbuilder.org/ – it does the trick quite nicely, just add your custom elements and bingo. Within a few minutes I was able to check and clear mail with no client side setup other then establishing an SSH session – pretty slick!
Challenge – Secure VNC access of the Internet
So let’s say you only have that same SSH connection, but you need more visual goodness then a CLI email client can provide? Sounds like a you want a VNC connection – but how unsafe would that be to run over the Internet? Enter VNC (Port 5900) Tunneling via Putty.
First, launch Putty and enter the address you would like to connect to via SSH. Before establishing a session, look on the left hand side, you will see various configuration options. Expand the categories -> Connection -> SSH -> Tunnels. Select Tunnels add the following information under add new forwarded port:
Source Port 5900
Destination Port 127.0.0.1:5900
Now establish your SSH connection (Login), once connected open your VNC client and point the host back at your local machine – 127.0.0.1 and Bonus you’re all set.
So regardless your UI preference there’s an SSH solution out there for you – Enjoy!
Leave a Reply
You must be logged in to post a comment.