• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: SSH on sheevaplug running debian on usb/mmc is terrible!!!!  (Read 2864 times)
Brandt
Newbie
*

Karma: 0
Posts: 38


View Profile
« on: September 21, 2010, 10:08:49 PM »

Half the time I try to ssh into my sheevaplug from either on the LAN or from the internet I get this:


bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
ssh: connect to host 192.168.0.200 port 22: Connection refused
bdaniels-mbp:~ bdaniels$ ssh root@192.168.0.200
root@192.168.0.200's password:





Finally when I get in, I usually get disconnected when I'm in the middle of something. All I see is a peer disconnect message. And then back to square one with connection refused messages until it suddenly prompts for a password....



-I have no firewall installed on the sheevaplug
-port 22 is open and forwarded on the router
-I have tried ALL the keepalive's in the ssh man pages
-have tried different ethernet cables
-MTU is 1500
-have tried UseDNS no


still terrible terrible terrible...

Logged

j0n3s
Newbie
*

Karma: 2
Posts: 13


View Profile
« Reply #1 on: September 22, 2010, 05:16:15 AM »

That's strange!

I have debian (testing) on Sheeva w/ SSH and i have no issue at all in 1 year! (except PSU of course)

I can do tunneling, remote shell, PK auth., etc. from internal network and internet.

And usually SSH is either working or not - it may happen to drop session, but I cannot remember to have "Connection refused" message as long as network is working and SSH is up.

My (stupid) guesses:
a) either other network component interfere with your server (most probably the router)
b) your LAN on Sheeva is defective and is dropping connections

Try running first the server in "sandbox", and monitor for a while network activity.
Logged

Brandt
Newbie
*

Karma: 0
Posts: 38


View Profile
« Reply #2 on: September 22, 2010, 04:54:39 PM »

with debug level 3 turned on, this is what happens when it decides to log me out in the middle of something:


root@debian:~# debug1: channel_free: channel 0: client-session, nchannels 1
debug3: channel_free: status: The following connections are open:
  #0 client-session (t4 r0 i0/0 o0/0 fd 5/6)

debug3: channel_close_fds: channel 0: r 5 w 6 e 7
Read from remote host <my domain>: Connection reset by peer
Connection to <my domain> closed.
debug1: Transferred: stdin 0, stdout 0, stderr 112 bytes in 1374.6 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.1
debug1: Exit status -1




and a normal exit:

root@debian:~# exitdebug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: rcvd eof
debug1: channel 0: output open -> drain
debug1: channel 0: rcvd close
debug1: channel 0: close_read
debug1: channel 0: input open -> closed
debug3: channel 0: will not send data after close

logout
debug3: channel 0: will not send data after close
debug1: channel 0: obuf empty
debug1: channel 0: close_write
debug1: channel 0: output drain -> closed
debug1: channel 0: almost dead
debug1: channel 0: gc: notify user
debug1: channel 0: gc: user detached
debug1: channel 0: send close
debug1: channel 0: is dead
debug1: channel 0: garbage collecting
debug1: channel_free: channel 0: client-session, nchannels 1
debug3: channel_free: status: The following connections are open:
  #0 client-session (t4 r0 i3/0 o3/0 fd -1/-1)

debug3: channel_close_fds: channel 0: r -1 w -1 e 7
Connection to <my domain> closed.
debug1: Transferred: stdin 0, stdout 0, stderr 43 bytes in 135.7 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.3
debug1: Exit status 0





here is when it won't let me log in right away:

(my desktop) bdaniels:~ $ ssh -vvv root@<mydomain>
Sun_SSH_1.1.3, SSH protocols 1.5/2.0, OpenSSL 0x0090704f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0
debug1: Connecting to <my domain> [<my IP>] port 22.
debug1: Connection established.
debug1: identity file /home/bdaniels/.ssh/identity type -1
debug3: Not a RSA1 key file /home/bdaniels/.ssh/id_rsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: no key found
debug2: key_type_from_name: unknown key type 'Proc-Type:'
debug3: key_read: no key found
debug2: key_type_from_name: unknown key type 'DEK-Info:'
debug3: key_read: no key found
debug3: key_read: no space
debug3: key_read: no space
debug3: key_read: no space
debug3: key_read: no space
debug3: key_read: no space
debug3: key_read: no space
debug3: key_read: no space
debug3: key_read: no space
debug3: key_read: no space
debug3: key_read: no space
debug3: key_read: no space
debug3: key_read: no space
debug3: key_read: no space
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: no key found
debug1: identity file /home/bdaniels/.ssh/id_rsa type 1
debug1: identity file /home/bdaniels/.ssh/id_dsa type -1
ssh_exchange_identification: read: Connection reset by peer
debug1: Calling cleanup 0x34894(0x0)

« Last Edit: September 22, 2010, 05:06:47 PM by Brandt » Logged

Brandt
Newbie
*

Karma: 0
Posts: 38


View Profile
« Reply #3 on: September 28, 2010, 02:30:34 PM »

I *think* I figured out what it is:


auto eth0
iface eth0 inet dhcp
#iface eth0 inet static
#address 192.168.0.200
#netmask 255.255.255.0
#network 192.168.0.0
#broadcast 192.168.0.255
#gateway 192.168.0.1


When set to dhcp all is well. When set to static that is when I get the problems above....
« Last Edit: September 28, 2010, 02:33:28 PM by Brandt » Logged

birdman
Sr. Member
****

Karma: 4
Posts: 440


View Profile WWW
« Reply #4 on: September 28, 2010, 05:19:00 PM »

When set to dhcp all is well. When set to static that is when I get the problems above....
Works without problem for me using a static IP address (over Wifi).
You seem to have a id_rsa file which is not an RSA1 file.   Any idea why?
Try removing it, creating just a dsa file with "ssh-keygen -t dsa -f id_dsa" (which is all I ever put in place) and seeing what happens.
Logged

maverickpl
Newbie
*

Karma: 1
Posts: 6


View Profile
« Reply #5 on: October 12, 2010, 05:49:49 AM »

I found the following link helpful:

http://library.linode.com/using-linux/security-basics/


You can also just google "ssh-keygen" and read about a couple things.  Finally, not to be obnoxious, but you really shouldn't ssh into your machine as root.  You should create a user and use the sudo command if you really need to do something as root.
Logged

bdewacht
Newbie
*

Karma: 0
Posts: 10


View Profile
« Reply #6 on: October 15, 2010, 06:24:13 PM »

Maybe very stupid, but do you have multiple devices with the same IP ??
Logged

Brandt
Newbie
*

Karma: 0
Posts: 38


View Profile
« Reply #7 on: October 18, 2010, 10:46:43 AM »

no...i can't explain it but, the things work perfectly when using a dhcp address versus static ip...
Logged

Pages: [1]
Print
Jump to: