<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ssh picking up wrong IP in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-picking-up-wrong-ip/m-p/5327953#M530120</link>
    <description>&lt;P&gt;I am running HP-UX 11.31 and trying to do an ssh from one server to another, but it is picking up&lt;/P&gt;&lt;P&gt;the wrong IP address...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the host coded in /etc/hosts file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 192.168.172.42&amp;nbsp; odcign1-0&lt;/P&gt;&lt;P&gt;and nslookup shows it correctly:&lt;/P&gt;&lt;P&gt;=&amp;gt;nslookup odcign1-0&lt;BR /&gt;Using /etc/hosts on:&amp;nbsp; tmovdb02&lt;/P&gt;&lt;P&gt;looking up FILES&lt;BR /&gt;Name:&amp;nbsp;&amp;nbsp;&amp;nbsp; odcign1-0&lt;BR /&gt;Address:&amp;nbsp; 192.168.172.42&lt;/P&gt;&lt;P&gt;=&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The /etc/nsswitch.conf file also specifies to check hosts first:&lt;/P&gt;&lt;P&gt;hosts:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; files [NOTFOUND=continue UNAVAIL=continue TRYAGAIN=continue] dns&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I do an ssh it is picking up an old IP from dns, and not using hosts file entry...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=&amp;gt;ssh -v odcign1-0&lt;BR /&gt;OpenSSH_5.6p1+sftpfilecontrol-v1.3-hpn13v7, OpenSSL 0.9.8o 01 Jun 2010&lt;BR /&gt;HP-UX Secure Shell-A.05.60.003, HP-UX Secure Shell version&lt;BR /&gt;debug1: Reading configuration data /opt/ssh/etc/ssh_config&lt;BR /&gt;debug1: Connecting to odcign1-0 [192.168.223.160] port 22.&lt;BR /&gt;debug1: connect to address 192.168.223.160 port 22: Connection refused&lt;BR /&gt;ssh: connect to host odcign1-0 port 22: Connection refused&lt;/P&gt;&lt;P&gt;=&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas as to why ?? I've requested our network group to remove the enty from DNS, but that could take&lt;/P&gt;&lt;P&gt;a few days....&lt;/P&gt;</description>
    <pubDate>Sat, 10 Sep 2011 17:42:09 GMT</pubDate>
    <dc:creator>MikeL_4</dc:creator>
    <dc:date>2011-09-10T17:42:09Z</dc:date>
    <item>
      <title>ssh picking up wrong IP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-picking-up-wrong-ip/m-p/5327953#M530120</link>
      <description>&lt;P&gt;I am running HP-UX 11.31 and trying to do an ssh from one server to another, but it is picking up&lt;/P&gt;&lt;P&gt;the wrong IP address...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the host coded in /etc/hosts file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 192.168.172.42&amp;nbsp; odcign1-0&lt;/P&gt;&lt;P&gt;and nslookup shows it correctly:&lt;/P&gt;&lt;P&gt;=&amp;gt;nslookup odcign1-0&lt;BR /&gt;Using /etc/hosts on:&amp;nbsp; tmovdb02&lt;/P&gt;&lt;P&gt;looking up FILES&lt;BR /&gt;Name:&amp;nbsp;&amp;nbsp;&amp;nbsp; odcign1-0&lt;BR /&gt;Address:&amp;nbsp; 192.168.172.42&lt;/P&gt;&lt;P&gt;=&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The /etc/nsswitch.conf file also specifies to check hosts first:&lt;/P&gt;&lt;P&gt;hosts:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; files [NOTFOUND=continue UNAVAIL=continue TRYAGAIN=continue] dns&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I do an ssh it is picking up an old IP from dns, and not using hosts file entry...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=&amp;gt;ssh -v odcign1-0&lt;BR /&gt;OpenSSH_5.6p1+sftpfilecontrol-v1.3-hpn13v7, OpenSSL 0.9.8o 01 Jun 2010&lt;BR /&gt;HP-UX Secure Shell-A.05.60.003, HP-UX Secure Shell version&lt;BR /&gt;debug1: Reading configuration data /opt/ssh/etc/ssh_config&lt;BR /&gt;debug1: Connecting to odcign1-0 [192.168.223.160] port 22.&lt;BR /&gt;debug1: connect to address 192.168.223.160 port 22: Connection refused&lt;BR /&gt;ssh: connect to host odcign1-0 port 22: Connection refused&lt;/P&gt;&lt;P&gt;=&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas as to why ?? I've requested our network group to remove the enty from DNS, but that could take&lt;/P&gt;&lt;P&gt;a few days....&lt;/P&gt;</description>
      <pubDate>Sat, 10 Sep 2011 17:42:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-picking-up-wrong-ip/m-p/5327953#M530120</guid>
      <dc:creator>MikeL_4</dc:creator>
      <dc:date>2011-09-10T17:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: ssh picking up wrong IP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-picking-up-wrong-ip/m-p/5328683#M530121</link>
      <description>&lt;P&gt;Do you have a file named like ~/.ssh/config in the home directory of the user running the "ssh" command? The old IP address might be defined in there, with something like:&lt;/P&gt;&lt;PRE&gt;Host odcign1-0
  HostName 192.168.223.160&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;The system-wide SSH client configuration file, /opt/ssh/etc/ssh_config might contain similar settings too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also make sure that the user running the ssh command is allowed to read /etc/hosts, /etc/nsswitch.conf and /etc/resolv.conf. I've seen cases where some of these files have been restricted to root only, causing the hostname lookup use unexpected sources. (For example, if /etc/nsswitch.conf is not readable for non-root users, their hostname resolution will use the factory default order: first DNS, then NIS (if configured) and /etc/hosts as the last source, as documented in the example file /etc/nsswitch.hp_defaults.)&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2011 09:46:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-picking-up-wrong-ip/m-p/5328683#M530121</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2011-09-12T09:46:01Z</dc:date>
    </item>
  </channel>
</rss>

