Linux

SSH – Assigning a Name to an IP

March 21, 2009

If you find yourself using SSH extensively like myself, then I’m sure you’re sick of typing out IPs constantly as you’re trying to log in. This can easily be resolved by adding it as a known host in SSH. This also comes in handy when you’re using a non standard SSH port and you need to connect through something like SVN.

pico ~/.ssh/config

Now enter something like the following:

host subversion
Hostname yourDomainOrIP.com
Port 22

Only registered users can comment.

  1. Because if you do it in the SSH file, you can add extra options like the port number to connect to, the username to use, whether to enable X11 forwarding, port forwarding mappings, etc.

  2. Exactly, I typically dont run my SSH server on port 22. And when setting up SVN+SSH its much easier to do it this way.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.