Connection refused (via SSH)

Post Reply
jgpallero
Posts: 22
Joined: Sun Jul 07, 2013 11:19 pm
languages_spoken: spanish,german,english
ODROIDs: Odroid-U2
Has thanked: 0
Been thanked: 0
Contact:

Connection refused (via SSH)

Unread post by jgpallero » Thu Aug 01, 2013 12:53 am

Hello,

i have installed on my Odroid-U2 the debian version from http://odroid.us/mediawiki/index.php?ti ... structions
Until 10 minutes ago the conexion was via ssh and all worked fine. But I don't know the reason because now I obtain the message

Code: Select all

ssh: connect to host xxx.xxx.xxx.xxx port 22: Connection refused
when I try to connect to it.

The system is alive because if I do a ping I obtain response

Code: Select all

PING xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx) 56(84) bytes of data.
64 bytes from xxx.xxx.xxx.xxx: icmp_seq=1 ttl=64 time=2.71 ms
64 bytes from xxx.xxx.xxx.xxx: icmp_seq=2 ttl=64 time=0.655 ms
64 bytes from xxx.xxx.xxx.xxx: icmp_seq=3 ttl=64 time=0.700 ms
64 bytes from xxx.xxx.xxx.xxx: icmp_seq=4 ttl=64 time=0.657 ms
Has anyone had the same problem? How can I fix it?

Thanks

osterluk
Posts: 311
Joined: Sun Feb 24, 2013 2:07 am
languages_spoken: English
ODROIDs: Odroid-U2
Has thanked: 0
Been thanked: 0
Contact:

Re: Connection refused (via SSH)

Unread post by osterluk » Thu Aug 01, 2013 3:42 am

DId you install any software just before it broke? Are you loggin in as normal user (non-root)? On the target, you can kill the sshd process and start it with the debug option, like this (as I remember) /usr/sbin/sshd -d

And you can see the login attempt come through. That can give you a clue.

check your /etc/sshd_config

jgpallero
Posts: 22
Joined: Sun Jul 07, 2013 11:19 pm
languages_spoken: spanish,german,english
ODROIDs: Odroid-U2
Has thanked: 0
Been thanked: 0
Contact:

Re: Connection refused (via SSH)

Unread post by jgpallero » Fri Aug 02, 2013 8:29 pm

osterluk wrote:DId you install any software just before it broke?


I updated the system, but I don't remember if any related ssh package was implied
osterluk wrote:Are you loggin in as normal user (non-root)?
I have tried to access as roo and as non-root user. And from different machines, but the result is always the same. The Odroid responds to ping, but refuse the ssh (and sftp) connections
osterluk wrote:On the target, you can kill the sshd process and start it with the debug option, like this (as I remember) /usr/sbin/sshd -d

And you can see the login attempt come through. That can give you a clue.
I couldn't start the ssh server in debug mode. I tried to connect with the options -vvv in order to obtain more verbosity output:

Code: Select all

ssh -vvv odroid@xxx.xxx.xxx.xxx
OpenSSH_6.2p2 Debian-6, OpenSSL 1.0.1e 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to xxx.xxx.xxx.xxx [xxx.xxx.xxx.xxx] port 22.
debug1: connect to address xxx.xxx.xxx.xxx port 22: Connection refused
ssh: connect to host xxx.xxx.xxx.xxx port 22: Connection refused
osterluk wrote:check your /etc/sshd_config
The sshd_config are exactly the same in the Odroid as in the machine where I try to connect

I have tried too to connect directly via a cable between the odroid and the pc, and I obtain the same result (I ussually connect in this way in my house, where I haven't network and I use a cross cable and configure the /etc/networks/interfaces with a simple 10.0.0.2 and 10.0.0.3 IPs)

Redcloak
Posts: 30
Joined: Sun May 05, 2013 6:14 am
languages_spoken: english
ODROIDs: ODROID-X, ODROID-X2
Has thanked: 0
Been thanked: 0
Contact:

Re: Connection refused (via SSH)

Unread post by Redcloak » Sat Aug 03, 2013 11:05 pm

It sounds to me like their may be some form of a firewall blocking port 22. I have had this happen to me before. If you have a serial port connection to the machine, run as root "iptables -L -n" and see if there is a block on port 22.

jgpallero
Posts: 22
Joined: Sun Jul 07, 2013 11:19 pm
languages_spoken: spanish,german,english
ODROIDs: Odroid-U2
Has thanked: 0
Been thanked: 0
Contact:

Re: Connection refused (via SSH)

Unread post by jgpallero » Mon Aug 05, 2013 7:26 pm

Redcloak wrote:It sounds to me like their may be some form of a firewall blocking port 22. I have had this happen to me before. If you have a serial port connection to the machine, run as root "iptables -L -n" and see if there is a block on port 22.
I have not any serial port connection. The output of iptables -L -n is:

Code: Select all

/sbin/iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Redcloak
Posts: 30
Joined: Sun May 05, 2013 6:14 am
languages_spoken: english
ODROIDs: ODROID-X, ODROID-X2
Has thanked: 0
Been thanked: 0
Contact:

Re: Connection refused (via SSH)

Unread post by Redcloak » Mon Aug 05, 2013 9:45 pm

All ports are open there, firewall is not the issue. Is the sshd process running? I expect it is but just thought I would ask. Try "ps -ef | grep ssh".

Redcloak
Posts: 30
Joined: Sun May 05, 2013 6:14 am
languages_spoken: english
ODROIDs: ODROID-X, ODROID-X2
Has thanked: 0
Been thanked: 0
Contact:

Re: Connection refused (via SSH)

Unread post by Redcloak » Mon Aug 05, 2013 9:59 pm

Also try this "netstat -at". See if ssh is listening.

Code: Select all

netstat -at
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 *:ssh                   *:*                     LISTEN

jgpallero
Posts: 22
Joined: Sun Jul 07, 2013 11:19 pm
languages_spoken: spanish,german,english
ODROIDs: Odroid-U2
Has thanked: 0
Been thanked: 0
Contact:

Re: Connection refused (via SSH)

Unread post by jgpallero » Wed Aug 07, 2013 5:26 pm

Redcloak wrote:Also try this "netstat -at". See if ssh is listening.

Code: Select all

netstat -at
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 *:ssh                   *:*                     LISTEN
Yes, ssh is listening on my laptop:

Code: Select all

netstat -at
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 *:ssh                   *:*                     LISTEN

Redcloak
Posts: 30
Joined: Sun May 05, 2013 6:14 am
languages_spoken: english
ODROIDs: ODROID-X, ODROID-X2
Has thanked: 0
Been thanked: 0
Contact:

Re: Connection refused (via SSH)

Unread post by Redcloak » Thu Aug 08, 2013 7:12 am

Sorry I don't have any other help. The U2 looks to be ready for your ssh connection.

User avatar
memeka
Posts: 4419
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 57 times
Contact:

Re: Connection refused (via SSH)

Unread post by memeka » Thu Aug 08, 2013 7:31 am

can you post the results of:

telnet xxx.xxx.xxx.xxx 22

jorricks
Posts: 48
Joined: Thu Aug 15, 2013 2:36 am
languages_spoken: english
ODROIDs: ODROID-U2
Has thanked: 0
Been thanked: 0
Contact:

Re: Connection refused (via SSH)

Unread post by jorricks » Thu Aug 15, 2013 3:06 am

I have this problem too after like 3 days.. I just figured it crashed everytime..
Hard resets fixes it..

wladek
Posts: 1
Joined: Thu Mar 27, 2014 6:14 am
languages_spoken: english
ODROIDs: u3
Has thanked: 0
Been thanked: 0
Contact:

Re: Connection refused (via SSH)

Unread post by wladek » Thu Mar 27, 2014 6:20 am

Really? But what is the hard reset you meant??!! Power off and on does not work for me. What is the default IP set by Ubuntu on Odroid?

mdrjr
Site Admin
Posts: 11735
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 1 time
Been thanked: 17 times
Contact:

Re: Connection refused (via SSH)

Unread post by mdrjr » Thu Mar 27, 2014 8:43 am

none, it acquires it via dhcp.

Post Reply

Return to “Others”

Who is online

Users browsing this forum: No registered users and 1 guest