Comment

Comment by kyrra

The ~/.ssh/config file was something I discovered when my my company was going through some changes and I had 2 different usernames for accessing internal systems.

   Host hosta hostb hostc
   User usera
   
   Host *
   User userb
Since my local system username was different than many of the remote systems I could wildcard to a different default username then had a list of servers that would use my other username.

The bad thing is, as the blog post shows, "Host" above is really just an alias. So if I have an entry like:

   Host hosta.mycompany.com
   User usera
and then try to do "ssh hosta", even if hosta resolves to hosta.mycompany.com, it won't match the config entry, as config entry data is all used prior to DNS lookup.

EDIT: thanks for all the suggestions below.

parent kyrra 12 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton