Linux:: SSH configuration file

To save some typing you can create aliases to the servers you frequently access via ssh. This can be accomplished by either editing the global file ( /etc/ssh/ssh_config ), if you’re root and and to make changes for all the users, or your own config file ( $HOME/.ssh/config ).

Follow the example, and remember to customize to your needs

Host *
Compression yes
Port 22
ForwardAgent yes

Host sample
HostName host.sample_of_a_very_long_host_name.com
User joe
ForwardAgent yes
Port 22
Compression yes

Now you can ssh into that server using:

ssh sample

Linux:: settings shortcuts for your ssh connections to hosts

If you wish you could use friendly names to access your servers, here’s how to do it:

Edit your ~/.ssh/config and add the following:

Host myserver
    HostName 123.123.123.123
    Port 12345
    User bob
Host other_server
    HostName test.something.org
    User alice
    CheckHostIP no
    Cipher blowfish

Please, remember to customize "HostName" and "User" values to your needs. 🙂

  • IGlr