1

I am on windows 10 machine. I need to ssh to our Bastion and then do port forwarding to connect to AWS instance. I have a config file that I use to ssh. My config file is as following:

Host [host] IdentityFile myprivatekey CheckHostIP no HostName [myhostname] User myuser LocalForward 3900 ip-XX.XXX.XX.XXX.eu-west-1.compute.internal:3389 

When I do ssh [host] I get the following error:

Error: $ ssh: Could not resolve hostname [HOSTNAME]: Name or service not known

2 Answers 2

2

I solved it. I recreated my private key and i moved to .ssh folder then i changed the path in my config file to :

~/.ssh/myprivatekey

Then it worked..

-1

It looks like a dns issue.

To figure out, try in cmd.exe : ping myhostname

It should not work.

Then you have two option :

  • add myhostname in your dns server

Or

  • add myhostname 1.2.3.4 (replace 1.2.3.4 with correct ip) in system32\driver\etc\hosts

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.