0

I am trying to do SSH localforward port setting in VI config file, so that I can connect Hive server to do some R programming.

Steps followed:

  1. In shell, I configured below in VI config file:
Host bdp-*
UserName a6000

Host bdp-prod
HostName pdl001.na.abc.com
LocalForward 10000:pdl002.na.abc.com:10000
  1. When I do
ssh bdp-prod

I get this error:

ssh: Could not resolve hostname bdp-prod: Name or service not known

I saw couple of similar issues posted here and viewed some blogs related to this setting but couldn’t figure out what is wrong:

ssh: Could not resolve hostname hnname: Name or service not known

OS-windows, ssh version is 4.1. bdp-prod is alias name for the hostname in config file.

1
  • Following up to @JakeGould, the hostname that needs to be resolvable on your computer is pdl001.na.abc.com. Regardless, unless you have a very different version of ssh, the UserName directive is not valid; should be just User. So, the question remains, what OS and what version of ssh? Commented Sep 15, 2015 at 15:57

2 Answers 2

1

I had the config file created at incorrect location. I now created configuration using

vi ~/.ssh/config

with same content as mentioned in question and able to have local port forward work. Thanks for all of your help.

0
-2
nscd --invalidate=hosts     

worked for me.

1
  • 1
    Some detail on what this does and why you need to do it would make this a good answer.
    – Mokubai
    Commented Nov 2, 2015 at 19:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .