One of the very cool features of the Dock available on Apple Mac OSX is the Stacks feature. It allows you to access files in a folder directly from the Dock.

This is commonly used for Documents and Downloads.  But for developers and system administrators this is a very useful feature to quickly open a terminal window to a remote server.

Here are the steps to accomplish it:

  1. Create a folder in the desktop, ie. ssh.
  2. Open a terminal, cd to new folder and run this command (replace username and hostname with proper values): echo “ssh username@hostname” > hostname
  3. Repeat #2 for all servers you want to add.
  4. Run following command in the terminal (make sure you are still in the ssh folder): chmod u+x *
  5. Drag folder to the Dock. Now when you click on it, you will get a list of servers, click on any of them and a terminal will open, connecting to the remote server.
  6. Done!

Make sure you also check out the different viewing modes (the default is the fan which is fancy but not best in my opinion). To change the viewing mode, right click on the ssh Dock icon and select the “View Content as” options.

There are endless uses as well, like executing scripts (local and remote), open websites, and many more. Let us know what other uses you apply.