sshssh-config

ssh: Could not resolve hostname ubuntu: Temporary failure in name resolution


I am trying to implement a ssh config file. It was working with a different ec2 instance moments ago, so I am not sure what is different here. I can ssh -i "key.pem" ubuntun@ipaddress just fine but when I use my config file ssh ubuntu I get the following error

debug1: Reading configuration data /home/anders/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
ssh: Could not resolve hostname ubuntu: Temporary failure in name resolution

My Config looks like the following

Host fsdfs.compute.amazonaws.com
User ubuntu
Port 22
IdentitiesOnly yes
IdentityFile ~/.ssh/fds-fds-dsfs.pem

When I run ls -ld on .ssh I get drwx------ 2 anders anders 4096 May 26 06:45 /home/anders/.ssh

When I run ls -ld on .ssh/config I get -rw------- 1 anders anders 137 May 26 06:26 /home/anders/.ssh/config

Hopefully someone can help with this. Thanks ahead of time


Solution

  • This ended up working for me, unless someone has a answer why mine didn't work this is the solution

    Host ubuntu  
      HostName fsdf.us-east-2.compute.amazonaws.com
      User ubuntu
      Port 22
      IdentitiesOnly yes
      IdentityFile ~/.ssh/fds-dfas-fdsa.pem