That's why I like SSH
This is yet another post which needs an explanation before I can start. German Bloggers like to throw "Stöckchen" (sticks) at other writers. This isn't offensive, but an invitation to write about a specific topic or question. I haven't heard about this in English blogs before, but I think that "throwing a bone" would be a quite matching expression.
So Klaus threw me a bone: Tell about an application for Linux you like.
This is quite a touch challenge for me. I never used Linux as a desktop OS, but all my servers are running Linux and there are many command line tools which started to grow on me. Klaus suggested that the bone is about desktop applications, so don't tell anyone I'm writing about my favorite command line tool.
So what is SSH?
Secure Shell or SSH is a network protocol that allows users to open a window on a local computer and connect to a remote computer as if they were sitting there - Wikipedia
It's basically the fasted and easiest way to mess with work on a remote machine. For me it's also (nearly) the only way to control and operate most of my servers.
SSH is a really versatile tool as it brings quite a few extra features like Tunneling, Forwarding & File Transfers. But let's start with something I like most.
Login with Keys instead of Passwords
Using a tool called ssh-keygen
on your local machine, which is preinstalled on Mac OS X and Linux systems and also available for Windows, you generate a pair of keyfiles. A private one which acts as your personal key and should never be shared with anyone and a public key which basically acts as a lock for your private key. You can share this with anyone who want's to give you access to something.
Once you generated the public key (which ends in .pub
), just copy it's content to a file named authorized_keys
the folder .ssh
in your remote users home directory. If the file doesn't exist, just create it.
From now on SSH will use the public key to check it against your private and if everything works out as expected, you can log in without entering any password.
For more detailed instructions you should visit the Ubuntu documentation which helped me a lot.
File Transfers
Some of you might already use SFTP, which is basically the file transfer protocol of SSH. If you do so, you can use the same key files! For example Transmit on Mac OS X supports login with keys out of the box. Yay!
Why use SFTP over FTP? I had no clue (except for the support for key files). But this guy has.
Tunneling and Forwarding
I don't use these features as much as the others, but they can be really useful. They allow you to re-route and securely wrap protocols, ports and transfers, which will help you in places where e.g. a firewall blocks your traffic on a specific port (like in a hotel or an office). Learn more about it at the Ubuntu documentation on Port Forwarding and Advanced features of (Open-)SSH
So what? I'm not using Linux.
These features work on any Unix machine, so also on your Mac! Windows users are not left alone. You can use PuTTY for most things SSH can do.
Back to the bone
I'm throwing this bone to Andreas who I know likes Linux and will hopefully have a more UI-Orientented hint for you.
So long.