LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 02-09-2010, 02:09 AM   #1
TheBrick
Member
 
Registered: Mar 2006
Location: London
Distribution: SUSE 10.0 Home soon to go (no internet conection), gentoo laptop, slack on development box
Posts: 81

Rep: Reputation: 15
ssh Connection closed by .....


Hello, I have a ssh problem.

Just started the morning as I stat up my machines this morning. All worked well yesterday.

ssh from desktop to laptop

Desktop
Code:
Distributor ID: Ubuntu
Description:    Ubuntu 7.10
Release:        7.10
Codename:       gutsy
Laptop

Code:
Distributor ID: Ubuntu
Description:    Ubuntu 9.10
Release:        9.10
Codename:       karmic
I try sshing from desktop to laptop

Code:
tommy@bodger1:~/marketstall$ ssh -Yv tommy@10.0.0.12
OpenSSH_4.6p1 Debian-5build1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 10.0.0.12 [10.0.0.12] port 22.
debug1: Connection established.
debug1: identity file /home/tommy/.ssh/identity type -1
debug1: identity file /home/tommy/.ssh/id_rsa type -1
debug1: identity file /home/tommy/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-6ubuntu2
debug1: match: OpenSSH_5.1p1 Debian-6ubuntu2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.6p1 Debian-5build1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '10.0.0.12' is known and matches the RSA host key.
debug1: Found key in /home/tommy/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
Connection closed by 10.0.0.12
so there appears to be an initial connection is made.

If I try and ssh onto localhost on the laptop I get the same issue. So I can't even ssh within the machine!

I've tried restarting ssh, I've tried restating my router, I've tried restarting my laptop. No luck.

I've looked at this thread
http://www.linuxquestions.org/questi...e-host-267052/ but it appear to be no help. That persons computer does not seem to make a connection like mine does. However I've still gone through the thread.

I've looked in
/proc/sys/net/core/netdev_max_backlog
and changed that from 1000 to 1001

I've looked in
/proc/sys/net/core/somaxconn
and changed that from 128 to 129


/etc/hosts.deny is all commented out

/etc/hosts.allow I've added my desktop i.p address.

No luck can someone please give me some help I have no idea on these issues.
 
Old 02-09-2010, 02:22 AM   #2
TheBrick
Member
 
Registered: Mar 2006
Location: London
Distribution: SUSE 10.0 Home soon to go (no internet conection), gentoo laptop, slack on development box
Posts: 81

Original Poster
Rep: Reputation: 15
More info

Code:
tommy@bodger:~$ sudo /etc/init.d/ssh restart
 * Restarting OpenBSD Secure Shell server sshd                                                       [ OK ]
tommy@bodger:~$ tail -n 20 /var/log/messages
Feb  9 07:47:03 bodger kernel: [   45.170092] [drm] DAC-6: set mode 640x480 0
Feb  9 07:47:03 bodger kernel: [   45.373302] [drm] TV-15: set mode NTSC 480i 0
Feb  9 07:47:04 bodger kernel: [   45.514539] [drm] TV-15: set mode NTSC 480i 0
Feb  9 07:47:04 bodger kernel: [   45.689763] [drm] DAC-6: set mode 640x480 0
Feb  9 07:47:04 bodger kernel: [   45.797096] [drm] DAC-6: set mode 640x480 0
Feb  9 07:47:05 bodger kernel: [   46.560244] [drm] TV-15: set mode NTSC 480i 0
Feb  9 07:47:05 bodger kernel: [   46.725370] [drm] TV-15: set mode NTSC 480i 0
Feb  9 07:47:38 bodger kernel: [   80.256829] __ratelimit: 3 callbacks suppressed
Feb  9 07:47:38 bodger kernel: [   80.256836] sshd[1455]: segfault at a5f4f92c ip 00c3a068 sp bfc7d14c error 6 in ld-2.10.1.so[c34000+1b000]
Feb  9 07:49:32 bodger kernel: [  193.560516] sshd[1526]: segfault at a5dca92c ip 001ed068 sp bfdd664c error 6 in ld-2.10.1.so[1e7000+1b000]
Feb  9 07:50:42 bodger kernel: [  263.468412] sshd[1529]: segfault at a5c5a8dc ip 00116068 sp bfb720dc error 6 in ld-2.10.1.so[110000+1b000]
Feb  9 07:52:13 bodger kernel: [  354.606103] sshd[1542]: segfault at a476f8dc ip 002c0068 sp bfc432cc error 6 in ld-2.10.1.so[2ba000+1b000]
Feb  9 08:04:50 bodger kernel: [ 1111.791490] sshd[1646]: segfault at a5ab092c ip 0099d068 sp bfa9de4c error 6 in ld-2.10.1.so[997000+1b000]
Feb  9 08:07:08 bodger kernel: [ 1250.448242] sshd[1650]: segfault at a4b6092c ip 00add068 sp bfc87dac error 6 in ld-2.10.1.so[ad7000+1b000]
Feb  9 08:15:15 bodger kernel: [ 1737.117857] [drm] DAC-6: set mode 640x480 0
Feb  9 08:15:15 bodger kernel: [ 1737.223058] [drm] DAC-6: set mode 640x480 0
Feb  9 08:15:15 bodger kernel: [ 1737.425423] [drm] TV-15: set mode NTSC 480i 0
Feb  9 08:15:16 bodger kernel: [ 1737.565738] [drm] TV-15: set mode NTSC 480i 0
Feb  9 08:17:38 bodger pulseaudio[1929]: ratelimit.c: 3 events suppressed
Feb  9 08:19:27 bodger kernel: [ 1988.840490] sshd[2256]: segfault at a60a4fa4 ip 00ed6068 sp bfb4fd3c error 6 in ld-2.10.1.so[ed0000+1b000]
 
Old 02-09-2010, 02:48 AM   #3
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
sshd should not be segfaulting. That looks like a bug. I think that debian has forked openssh. Make sure you don't send bug reports to openssh developers if that is the case.

A segfault sometimes indicates improperly handled error conditions so there could still be something wrong with your configuration. Things you haven't checked are permissions for the home directory, ~/.ssh, and files in .ssh such as your private key. Have you changed permissions or changed security to permissive? Use "ssh -vv" for debugging.

Validate the files for the openssh package. You may have changed a library or have a corrupted file. Perhaps reinstall the openssh package.

Is Ubuntu 7.1 still supported?
 
Old 02-09-2010, 03:27 AM   #4
TheBrick
Member
 
Registered: Mar 2006
Location: London
Distribution: SUSE 10.0 Home soon to go (no internet conection), gentoo laptop, slack on development box
Posts: 81

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jschiwal View Post
sshd should not be segfaulting. That looks like a bug. I think that debian has forked openssh. Make sure you don't send bug reports to openssh developers if that is the case.

A segfault sometimes indicates improperly handled error conditions so there could still be something wrong with your configuration. Things you haven't checked are permissions for the home directory, ~/.ssh, and files in .ssh such as your private key. Have you changed permissions or changed security to permissive? Use "ssh -vv" for debugging.

Validate the files for the openssh package. You may have changed a library or have a corrupted file. Perhaps reinstall the openssh package.

Is Ubuntu 7.1 still supported?
Thanks for the reply. The laptop is on 9.10 and that's the machine with the problem so worries there regarding support.

Checked ~/.ssh I've only got known_hosts in there and that is owned by tommy with rw and r for others

trying ssh -vv (see below) and to me it seems to offer nothing extra. I think you may be correct with the bug. I was suspitious when I saw segfault but lived in hope. I've tried reinstalling through synaptic and that has not fixed anything.

I hate it when things like this happen as to me things don't "just break" as it appears to have happened here with a working machine yesterday and a broken one today.

I leave this post for a bit to see if anyone else has any ideas.

T

Code:
tommy@bodger:~$ ssh -vv tommy@localhost
OpenSSH_5.1p1 Debian-6ubuntu2, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config   
debug1: Applying options for *                           
debug2: ssh_connect: needpriv 0                          
debug1: Connecting to localhost [::1] port 22.           
debug1: Connection established.                          
debug1: identity file /home/tommy/.ssh/identity type -1  
debug1: identity file /home/tommy/.ssh/id_rsa type -1    
debug1: identity file /home/tommy/.ssh/id_dsa type -1    
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-6ubuntu2
debug1: match: OpenSSH_5.1p1 Debian-6ubuntu2 pat OpenSSH*                                 
debug1: Enabling compatibility mode for protocol 2.0                                      
debug1: Local version string SSH-2.0-OpenSSH_5.1p1 Debian-6ubuntu2                        
debug2: fd 3 setting O_NONBLOCK                                                           
debug1: SSH2_MSG_KEXINIT sent                                                             
debug1: SSH2_MSG_KEXINIT received                                                         
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1                                                               
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss                                                                  
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr                                
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr                                
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96                                                                                    
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96                                                                                    
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib                                                       
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib                                                       
debug2: kex_parse_kexinit:                                                                                  
debug2: kex_parse_kexinit:                                                                                  
debug2: kex_parse_kexinit: first_kex_follows 0                                                              
debug2: kex_parse_kexinit: reserved 0                                                                       
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1                                                               
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss                                                                  
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr                                
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr                                
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96                                                                                    
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_setup: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_setup: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 113/256
debug2: bits set: 500/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'localhost' is known and matches the RSA host key.
debug1: Found key in /home/tommy/.ssh/known_hosts:1
debug2: bits set: 510/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/tommy/.ssh/identity ((nil))
debug2: key: /home/tommy/.ssh/id_rsa ((nil))
debug2: key: /home/tommy/.ssh/id_dsa ((nil))
Connection closed by ::1
 
Old 02-10-2010, 05:58 AM   #5
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Try your test ssh'ing in from another computer. Not localhost. You also seem to be using IPv6. Is that intentional?
Check your /etc/hosts file.

Code:
...
#

127.0.0.1       localhost

# special IPv6 addresses
::1             localhost ipv6-localhost ipv6-loopback
You may be missing the IPv4 entry.

Make sure you gave your computer a hostname. Some installs default to localhost.localdomain which another computer will never reach. I think this is to prevent name collisions of you install on two or more hosts without changing the hostname.

Check the value of "AddressFamily" in the servers /etc/ssh/sshd_config.

Last edited by jschiwal; 02-10-2010 at 05:59 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get a local(client) reboot (init 6) when a ssh connection is closed? tuxhats Linux - Networking 4 08-28-2007 05:08 PM
SSH Connection Closed only when RSA Keys are present Sburk Linux - Software 3 06-07-2007 02:09 PM
SSH connection closed after username matcal Linux - Security 4 10-24-2005 11:04 AM
ssh connection closed by server m_yates Linux - Security 3 08-10-2005 03:12 PM
rsync thru SSH --- connection unexpectedly closed shawn_t Linux - Networking 4 02-25-2005 02:27 PM


All times are GMT -5. The time now is 06:54 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration