1. The beauty of the ssh config file

    This is a tip that I have used on OS X and on Linux, which I presume works on other *nix and BSDs using SSH.

    Basically in the .ssh folder in your home directory you can create a file called config with which you can put all sorts of configuration information for your ssh client but the real benefit for me was to use this to give extra information to hosts such as defining a different port number to connect on. For instance:

    Host myservername
            User myuser
            Port 22222

    This means that instead of typing:

    ssh -p 22222 myuser@myservername

    I can type:

    ssh myservername

    No need for nasty aliases in the shell or anything like that. This also works for the sshfs program on the Mac that makes use of MacFuse. Yes that’s right you can use different ports with SSHfs.

    You can also change a much wider range of parameters than I have shown here, but often its probably better to introduce them on the server. But here is an example and have a look under the options flag in the Man page for SSH

    Compression yes
    CompressionLevel 9
    FallBackToRsh yes
    KeepAlive no
    By timc3 on the
    September 4th, 2009

Please post a comment