- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - HP-UX
- >
- System Administration
- >
- ssh: connect to host port 22: Connection refused
-
-
Categories
- Topics
- Hybrid IT with Cloud
- Mobile & IoT
- IT for Data & Analytics
- Transformation
- Strategy and Technology
- Products
- Cloud
- Integrated Systems
- Networking
- Servers and Operating Systems
- Services
- Storage
- Company
- Events
- Partner Solutions and Certifications
- Welcome
- Welcome
- Announcements
- Tips and Tricks
- Feedback
-
Blogs
- Alliances
- Around the Storage Block
- Behind the scenes @ Labs
- Converged Data Center Infrastructure
- Digital Transformation
- Grounded in the Cloud
- HPE Careers
- HPE Storage Tech Insiders
- Infrastructure Insights
- Inspiring Progress
- Internet of Things (IoT)
- My Learning Certification
- Networking
- OEM Solutions
- Servers: The Right Compute
- Telecom IQ
- Transforming IT
-
Quick Links
- Community
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Contact
- Email us
- Tell us what you think
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Enterprise.nxt
- Marketplace
- Aruba Airheads Community
-
Categories
-
Forums
-
Blogs
-
InformationEnglish
ssh: connect to host port 22: Connection refused
SOLVED- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-18-2010 02:24 PM
06-18-2010 02:24 PM
I am experiencing the following problem: I just installed a c7000 enclosure with 3 blades. They are connected to the enclosure's 2 cisco switches for the lan connection. These 2 switches have been configured by our network guys.
I have installed HP-UX 11iv3 on the 3 blades, with lan0 set up as the interface. At the moment I cannot connect via ssh on lan0 on either blades, but I set up the other interfaces and I can connect on them. lan0 replies on ping, but ssh gives me the error in the subject and I cannot acces from one blade to another or from outside the enclosure.
To be more specific, the 3 blades are:
sculptor
cepheus
serpens
These are the network settings from one blade:
sculptor:~# lanscan
Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI
Path Address In# State NamePPA ID Type Support Mjr#
0/2/2/0 0x00226403921A 2 UP lan2 snap2 1 ETHER Yes 119
0/1/1/1 0x002264039219 1 UP lan1 snap1 3 ETHER Yes 119
LinkAgg0 0x00226403921B 900 UP lan900 snap900 6 ETHER Yes 119
LinkAgg1 0x000000000000 901 DOWN lan901 snap901 7 ETHER Yes 119
LinkAgg2 0x000000000000 902 DOWN lan902 snap902 8 ETHER Yes 119
LinkAgg3 0x000000000000 903 DOWN lan903 snap903 9 ETHER Yes 119
LinkAgg4 0x000000000000 904 DOWN lan904 snap904 10 ETHER Yes 119
sculptor:~# ifconfig lan900
lan900: flags=1843
inet 10.230.169.53 netmask ffff0000 broadcast 10.230.255.255
sculptor:~# ifconfig lan1
lan1: flags=1843
inet 10.230.169.7 netmask ffff0000 broadcast 10.230.255.255
sculptor:~# ifconfig lan2
lan2: flags=1843
inet 10.230.169.9 netmask ffff0000 broadcast 10.230.255.255
I am trying to connect via ssh from another blade:
cepheus:~# ssh sculptor
ssh_exchange_identification: read: Connection reset by peer
cepheus:~# ssh sculptor
ssh: connect to host sculptor port 22: Connection refused
cepheus:~# ssh 10.230.169.7
Password:
sculptor:/root#exit
logout root
Connection to 10.230.169.7 closed.
cepheus:~# ssh 10.230.169.9
Password:
cepheus:~# ping sculptor
PING sculptor..: 64 byte packets
64 bytes from 10.230.169.53: icmp_seq=0. time=0. ms
64 bytes from 10.230.169.53: icmp_seq=1. time=0. ms
64 bytes from 10.230.169.53: icmp_seq=2. time=1. ms
64 bytes from 10.230.169.53: icmp_seq=3. time=0. ms
----sculptor.. PING Statistics----
4 packets transmitted, 4 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/0/
I started another ssh daemon on port 222, on sculptor:
cepheus:~# telnet sculptor 22
Trying...
Connected to sculptor...
Escape character is '^]'.
Connection closed by foreign host.
cepheus:~# telnet sculptor 222
Trying...
telnet: Unable to connect to remote host: Connection refused
cepheus:~# telnet 10.230.169.7 222
Trying...
Connected to 10.230.169.7.
Escape character is '^]'.
SSH-2.0-OpenSSH_5.2p1+sftpfilecontrol-v1.3-hpn13v5
And on sculptor I see:
debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8
debug1: inetd sockets after dupping: 3, 3
debug1: audit connection from 10.230.169.26 port 63816 euid 0
debug1: Information
Ip:10.230.169.26
Port 63816
Session id:16399
af_family=2
Command=
debug1: audit_ret = 0
Connection from 10.230.169.26 port 63816
debug1: HPN Disabled: 0, HPN Buffer Size: 65536
Did not receive identification string from 10.230.169.26
If I unplumb lan1 & lan2 from cepheus and try again:
cepheus:~# ifconfig lan2 unplumb
cepheus:~# ifconfig lan1 unplumb
cepheus:~# telnet 10.230.169.7 222
Trying...
telnet: Unable to connect to remote host: Connection timed out
And on sculptor:
Server listening on 0.0.0.0 port 222.
debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8
debug1: inetd sockets after dupping: 3, 3
setsockopt SO_KEEPALIVE: Invalid argument
debug1: getpeername failed: Invalid argument
debug1: get_remote_port failed
This seems to be a network issue, but the network guys keep telling me they see no problem on the switch :(
Any help would be greatly appreciated.
Thanks guys
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-20-2010 04:40 AM
06-20-2010 04:40 AM
Re: ssh: connect to host port 22: Connection refused
Re: ssh: connect to host port 22: Connection refused
it will provide more info about the connection to ssh with port 22:
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-20-2010 07:57 AM
06-20-2010 07:57 AM
Re: ssh: connect to host port 22: Connection refused
Re: ssh: connect to host port 22: Connection refused
cepheus:~# ssh -vvv sculptor
OpenSSH_5.2p1+sftpfilecontrol-v1.3-hpn13v5, OpenSSL 0.9.8k 25 Mar 2009
HP-UX Secure Shell-A.05.20.015, HP-UX Secure Shell version
debug1: Reading configuration data /opt/ssh/etc/ssh_config
debug3: RNG is ready, skipping seeding
debug2: ssh_connect: needpriv 0
debug1: Connecting to sculptor [10.230.169.53] port 22.
debug1: connect to address 10.230.169.53 port 22: Connection refused
ssh: connect to host sculptor port 22: Connection refused
cepheus:~# ping sculptor
PING sculptor.connex.ro: 64 byte packets
64 bytes from 10.230.169.53: icmp_seq=0. time=0. ms
64 bytes from 10.230.169.53: icmp_seq=1. time=0. ms
----sculptor.connex.ro PING Statistics----
2 packets transmitted, 2 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/0/0
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-20-2010 08:52 AM
06-20-2010 08:52 AM
Re: ssh: connect to host port 22: Connection refused
Re: ssh: connect to host port 22: Connection refused
If the complaint is "Connection refused",
then I would not expect to learn much from
"-v[v[v]]". "Connection refused" normally
means that the client can talk to the server
system, but that the particular (SSH) server
program is not running/registered.
Perhaps I'm easily confused, but I see a mix
of host names and IP addresses in your
commands, and it's not clear to me which
address goes with which name.
> LinkAgg0 [...]
I don't use this feature, so I know nothing, but ...
> sculptor:~# ifconfig lan1
> lan1: flags=1843
> inet 10.230.169.7 netmask ffff0000 broadcast 10.230.255.255
> sculptor:~# ifconfig lan2
> lan2: flags=1843
> inet 10.230.169.9 netmask ffff0000 broadcast 10.230.255.255
So, this system has two interfaces on the same subnet? (Is that wise?)
> If I unplumb lan1 & lan2 from cepheus and try again:
> [...]
Well, yeah. If you kill off all the
interfaces, then something may stop working.
What happens if you leave one interface
working?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-20-2010 09:06 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-20-2010 09:52 AM
06-20-2010 09:52 AM
Re: ssh: connect to host port 22: Connection refused
Re: ssh: connect to host port 22: Connection refused
10.230.169.53 sculptor
10.230.169.54 cepheus
10.230.169.55 serpens
Only lan900 will be used in the end, the others I configured for troubleshooting. The problem was before configuring APA and persisted after, too.
the lanscan for sculptor is in my first post. the rest below:
sculptor:~# netstat -in
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
lo0 32808 127.0.0.0 127.0.0.1 5735370 0 5735371 0 0
lan1 1500 10.230.0.0 10.230.169.7 656080 0 1935 0 0
lan900 1500 10.230.0.0 10.230.169.53 64747 0 21469 0 0
sculptor:~# netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 32808
10.230.169.7 10.230.169.7 UH 0 lan1 32808
10.230.169.53 10.230.169.53 UH 0 lan900 32808
10.230.0.0 10.230.169.53 U 2 lan900 1500
10.230.0.0 10.230.169.7 U 2 lan1 1500
127.0.0.0 127.0.0.1 U 0 lo0 32808
default 10.230.169.230 UG 0 lan900 1500
sculptor:~# traceroute 10.230.169.54
traceroute to 10.230.169.54 (10.230.169.54), 30 hops max, 40 byte packets
1 cepheus.connex.ro (10.230.169.54) 0.382 ms 0.523 ms 0.200 ms
sculptor:~# traceroute 10.230.169.54
traceroute to 10.230.169.54 (10.230.169.54), 30 hops max, 40 byte packets
1 10.230.169.54 (10.230.169.54) 0.800 ms * *
sculptor:~# traceroute 10.230.169.54
traceroute to 10.230.169.54 (10.230.169.54), 30 hops max, 40 byte packets
1 * * *
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
7 * * *
8 * * *
9 * * *
10 * * *
11 * *
sculptor:~#
sculptor:~# traceroute 10.230.169.54
traceroute to 10.230.169.54 (10.230.169.54), 30 hops max, 40 byte packets
1 * *
sculptor:~# telnet 10.230.169.54 22
Trying...
telnet: Unable to connect to remote host: Connection refused
sculptor:~# telnet 10.230.169.54 22
Trying...
telnet: Unable to connect to remote host: Connection refused
sculptor:~# traceroute 10.230.169.54
traceroute to 10.230.169.54 (10.230.169.54), 30 hops max, 40 byte packets
1 cepheus.connex.ro (10.230.169.54) 0.341 ms 0.293 ms 0.158 ms
sculptor:~# traceroute 10.230.169.54
traceroute to 10.230.169.54 (10.230.169.54), 30 hops max, 40 byte packets
1 cepheus.connex.ro (10.230.169.54) 0.311 ms 0.220 ms 0.151 ms
sculptor:~# traceroute 10.230.169.54
traceroute to 10.230.169.54 (10.230.169.54), 30 hops max, 40 byte packets
1 cepheus.connex.ro (10.230.169.54) 0.291 ms 0.188 ms 0.144 ms
This problem is starting to drive me nuts :(
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-20-2010 12:02 PM
06-20-2010 12:02 PM
Re: ssh: connect to host port 22: Connection refused
Re: ssh: connect to host port 22: Connection refused
sculptor:
sculptor:~# ping serpens
PING serpens.connex.ro: 64 byte packets
----serpens.connex.ro PING Statistics----
1427 packets transmitted, 0 packets received, 100% packet loss
sculptor:~# ping cepheus
----cepheus.connex.ro PING Statistics----
1443 packets transmitted, 158 packets received, 89% packet loss
round-trip (ms) min/avg/max = 0/0/2
cepheus:
cepheus:~# ping sculptor
----sculptor.connex.ro PING Statistics----
1473 packets transmitted, 712 packets received, 51% packet loss
round-trip (ms) min/avg/max = 0/0/2
cepheus:~# ping serpens
----serpens.connex.ro PING Statistics----
1511 packets transmitted, 721 packets received, 52% packet loss
round-trip (ms) min/avg/max = 0/0/2
serpens:
serpens:~# ping cepheus
----10.230.169.54 PING Statistics----
1051 packets transmitted, 161 packets received, 84% packet loss
round-trip (ms) min/avg/max = 0/0/0
serpens:~# ping sculptor
----sculptor.connex.ro PING Statistics----
1360 packets transmitted, 244 packets received, 82% packet loss
round-trip (ms) min/avg/max = 0/0/2
Thanks for the help guys!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-21-2010 07:16 AM
06-21-2010 07:16 AM
Re: ssh: connect to host port 22: Connection refused
Re: ssh: connect to host port 22: Connection refused
Thank you for the assistance, points assigned.
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2018 Hewlett Packard Enterprise Development LP