Operating System - HP-UX
1822708 Members
3429 Online
109644 Solutions
New Discussion юеВ

SSH Problem on HP box - ssh:Name or service not known

 
Reshma Malusare
Trusted Contributor

SSH Problem on HP box - ssh:Name or service not known


Hello Experts,

While connecting to server via ssh, i observed below error:

ssh -l username servername
ssh: servername: Name or service not known

Please, suggest what is the solution to overcome this problem and get ssh connection to server.
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: SSH Problem on HP box - ssh:Name or service not known

Shalom,

swlist -l product | grep -i secure

You should see a product called secure shell, which is openssh.

/sbin/init.d/secsh start

On the target machine if its an HP-UX system.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Reshma Malusare
Trusted Contributor

Re: SSH Problem on HP box - ssh:Name or service not known

Hello,

I checked on the server. there is no problem. sshd is daemon is running fine.

My question is

when i do ssh with hostname its giving me error, but when i do ssh with ip address its sucessful.

It must be problem with name resolutin service. I tried to check, but didnt find anything.

My nsswitch conf file is having below entry:

#hosts: db files ldap nis dns
hosts: files dns
Ivan Krastev
Honored Contributor

Re: SSH Problem on HP box - ssh:Name or service not known

SSH use reverse dns to check incoming requests.
You can disable it in sshd_conf file on the server :

UseDNS no


regards,
ivan
Reshma Malusare
Trusted Contributor

Re: SSH Problem on HP box - ssh:Name or service not known

Hello,

Thanks for reply.

The server from where i am doing ssh to HP box is linux server.

Can your provide me the complete path of sshd_config.

ALso step was procedure of solution to this issue.

Ivan Krastev
Honored Contributor

Re: SSH Problem on HP box - ssh:Name or service not known

In Linux - /etc/ssh/sshd_config
HP-UX - /etc/opt/ssh/sshd-config

Check also name resolutions - target host should be resolved from source host.

regards,
ivan
Jeeshan
Honored Contributor

Re: SSH Problem on HP box - ssh:Name or service not known

Hi Reshma

did you try IP instead of servername?

Are you running a local DNS that maps your server IP to , or do you have in your /etc/hosts file? Can you do this?
#ping

If the answer to both is no, then you can only ssh by IP address.
a warrior never quits