- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- issue with ssh doing wrong name resolution
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2009 01:26 AM
тАО07-16-2009 01:26 AM
and we are unable to edit the entry so we are using /etc/hosts for name resolution
Im trying to ssh to a server with /etc/nsswitch.conf having entry
hosts: files [NOTFOUND=continue UNAVAIL=continue TRAYGAIN=continue] dns
But the ssh is resolving the name using DNS.
grep cap1rtr7 /etc/hosts
10.130.145.37 prortr07.unix.gsm1900.org prortr07 cap1rtr7 cap1rtr7.gsm1900.org bil1rtr7
tstsam15:17(/root)# ssh -v cap1rtr7
OpenSSH_3.9, OpenSSL 0.9.7d 17 Mar 2004
HP-UX Secure Shell-A.03.91.009, HP-UX Secure Shell version
debug1: Reading configuration data /opt/ssh/etc/ssh_config
debug1: Connecting to cap1rtr7 [10.130.145.50] port 22.
please help the nslookup is using /etc/hosts only
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2009 01:46 AM
тАО07-16-2009 01:46 AM
Re: issue with ssh doing wrong name resolution
Make another seperate entry in /etc/hosts file for cap1rtr7 like below.
10.130.145.37 cap1rtr7 cap1rtr7.gsm1900.org
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2009 02:11 AM
тАО07-16-2009 02:11 AM
Re: issue with ssh doing wrong name resolution
It is not working even then.
It is working only when im removein /etc/resolv.conf which we dont want to do
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2009 02:24 AM
тАО07-16-2009 02:24 AM
Re: issue with ssh doing wrong name resolution
What entries you have in your /etc/resolv.conf.Can you post it???
Regards
Sunny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2009 02:28 AM
тАО07-16-2009 02:28 AM
Re: issue with ssh doing wrong name resolution
search unix.gsm1900.org gsm1900.org voicestream.com .
nameserver 10.1.16.43
nameserver 10.1.16.46
nameserver 10.65.16.41
nameserver 10.133.113.71
retry 1
retrans 1000
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2009 02:36 AM
тАО07-16-2009 02:36 AM
Re: issue with ssh doing wrong name resolution
I think it goes to name server for resolving. You need to check /etc/nsswitch.conf.
Regards,
Asif Sharif
Asif Sharif
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2009 02:47 AM
тАО07-16-2009 02:47 AM
Re: issue with ssh doing wrong name resolution
#
# /etc/nsswitch.files:
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any name services.
#
passwd: files
group: files
hosts: files [NOTFOUND=continue UNAVAIL=continue TRYAGAIN=continue] dns
services: files
networks: files
protocols: files
rpc: files
publickey: files
netgroup: files
automount: files
aliases: files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2009 02:48 AM
тАО07-16-2009 02:48 AM
Re: issue with ssh doing wrong name resolution
hosts: files [NOTFOUND=continue UNAVAIL=continue TRAYGAIN=continue] dns
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2009 03:03 AM
тАО07-16-2009 03:03 AM
Re: issue with ssh doing wrong name resolution
It is syntax error on your nsswitch.conf file. You should press "tab" after hosts: and put your order like this.
hosts: files [NOTFOUND=continue] dns
It looks you don't have any space between hosts:files
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2009 03:15 AM
тАО07-16-2009 03:15 AM
SolutionCheck this option with nslookup to find which source nslookup is using for naming resolution.
#nslookup -swtrace cap1rtr7
It should use files first then goto dns. If it is directly going to DNS means it is having some issue with /etc/nsswitch.conf
If it is searching on files first then goes to DNS means it is ok. But if it is not resolving from files means some issue with /etc/hosts file.
Ganesh.