~/.ssh/config Noob Problems

I did a computer rebuild a month or two ago, and I couldn’t seem to get my ssh config file to work. I setup some aliases for a few servers I connect to, and nothing would happen when I actually tried to connect. However, if I typed the whole address in from the command line, no problems.

As an example, one of these was called “armstrong.” Turning on verbose mode made the problem clear. When trying to use the alias, ssh tried to connect to a different IP address than the whole written URL.

ssh refuses to use a config file unless the permissions for that file are set appropriately–that is, only if the user who owns the file can read and write to it.

How could that be the problem? I’m the only user on this machine.

But I’m not. When I created the files, I used sudo, because sudo is magic computer sauce that makes everything work. So technically, the ~/.ssh/config file belonged to the root user, not to me, and because of that, ssh refused to use it.

So, ssh is magic sauce. It works pretty good on a lot of things, but for some things, it ruins them.

And don’t forget,


must be made with

vim ~/.ssh/config


sudo vim ~/.ssh/config