Saving time with SSH

All paths in this blog are based of CentOS 5/6

Many times I see people type out the same SSH commands with many different options, usually these options are the same and people type them out each and every time. For example, if your company decides that they’re going to put SSH on an alternative port, lets say 200 in this case, and you always login to the server as an admin user then most people will run the command :

ssh -p200

If you have a couple of hundred servers to do this with then you can make the admin user your default login user as well as making port 200 your default port.

This can be done by editing the file /etc/ssh/ssh_config and appending the two lines below.

Port 200s
User admin

You will then be able to login to every server with a more simple command below and get exactly the same as the above ssh command.

ssh 192.168.0.1

That’s 11 characters saved with each SSH login, think of the time you can save over the years just with this one simple step :) .

This entry was posted in Managed Hosting. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>