Smylers over at the Smylers Blog has an outstanding post on little known things you can do with SSH. Even after years of using SSH daily, there were still a couple of tricks new to me in the post. Smylers mostly assumes you’re using OpenSSH, which unless you’re a Windows user you probably are. Even so, he shows how to do the same things with Putty or Copssh, so this is a worth while read for anyone who connects to a remote system.
Among the things he shows you are:
- How to share a single remote connection with several terminal windows. That’s handy when you want to have several views into your work on the remote server but don’t want to go through the pain of authenticating several times.
- How to SCP over an existing connection.
- How to make an SSH connection persist even if you log out.
- How to set up an SSH key so that you don’t have to give your password when you sign on.
- How to move that key to the remote system automatically. This is a real time saver because doing it manually is a pain.
- How to forward connections from one remote server to another.
- How to set up host aliases so you don’t have to type a long fully qualified host name.
- How to configure the user name you use on the remote host if it’s different from your user name on your local host. This removes the necessity to specify your login name when you connect.
- How to forward X11 connections.
- How to mount remote files locally over an SSH connection.
- How to connect to remote services with a local application. For example, if you have a database on a remote system that expects a connection on a certain port on the remote system you can configure SSH to do port forwarding to enable this.
There are some other tricks as well. Some of the commenters offer additional tricks so be sure to read them too. This is a really great post and if you’re an SSH user you should read it without delay. It has some techniques that will really make your work flow easier.