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
A seasoned Senior Solutions Architect with 20 years of experience in technology design and implementation. Renowned for innovative solutions and strategic insights, he excels in driving complex projects to success. Outside work, he is a passionate fisherman and fish keeper, specializing in planted tanks.
Out of interest, why would you do that in the ssh config and not just add the host to /etc/hosts?
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.
Because not everyone has access to /etc/hosts
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.