Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using the following to successfully connect to a server:

ssh -i /path/to/cert.pem username@

I would like to create an alias for my host. I have the following in my .ssh/config

Host aliasname
User username
IdentityFile /path/to/cert.pem

Then when I enter ssh aliasname it says: ssh: Could not resolve hostname aliasname: Name or service not known. Have I missed something?

share|improve this question
up vote 0 down vote accepted

The config was valid. The problem was my network connection had gone offline. Someone pass me a dunce hat.

share|improve this answer

it may not be reading your config, or your config is broken otherwise. use ssh -v to see which data config it is loading from, and paste your output here. the config entry you listed seems to be correct, at least for the current version of ssh. also, make that the first entry to avoid something else clobbering it. what is your distro and ssh version, by the way, so that others with the same can help you more.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.