Subject: ssh problem after migration ("Read from socket failed")
From: "elecinf1" <gilles@harfang.homelinux.org>
Date: Sat, 22 Nov 2008 13:59:13 +0100

 Sat, 22 Nov 2008 13:59:13 +0100
Hello.

Due to my machine having died unexpectedly, I copied the vservers files
over to another machine (together with the contents of /etc/vservers).
The vservers start but I have this problem:
Trying to connect to a guest (from the host)

$ ssh -vvv mail
OpenSSH 5.1p1 Debian-3, 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 mail [192.168.20.11] port 22.
debug1: Connection established.
debug1: identity file /home/eran/.ssh/identity type -1
debug3: Not a RSA1 key file /home/eran/.ssh/id rsa.
debug2: key type from name: unknown key type '-----BEGIN'
debug3: key read: missing keytype
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug3: key read: missing whitespace
debug2: key type from name: unknown key type '-----END'
debug3: key read: missing keytype
debug1: identity file /home/eran/.ssh/id rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/eran/.ssh/id dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH 4.3p2
Debian-9etch3
debug1: match: OpenSSH 4.3p2 Debian-9etch3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH 5.1p1 Debian-3
debug2: fd 3 setting O NONBLOCK
debug1: SSH2 MSG KEXINIT sent
Read from socket failed: Connection reset by peer

Any idea of what can cause this?
And, on the server, the log shows:

2008-11-22 12:49:20.16199 debug1: Forked child 9494.
2008-11-22 12:49:20.16233 debug1: rexec start in 4 out 4 newsock 4 pipe 6 sock 7
2008-11-22 12:49:20.17449 debug1: inetd sockets after dupping: 3, 3
2008-11-22 12:49:20.17551 Connection from 192.168.20.11 port 44765
2008-11-22 12:49:20.17626 debug1: Client protocol version 2.0; client software
version OpenSSH 5.1p1 Debian-3
2008-11-22 12:49:20.17633 debug1: match: OpenSSH 5.1p1 Debian-3 pat OpenSSH*
2008-11-22 12:49:20.17638 debug1: Enabling compatibility mode for protocol 2.0
2008-11-22 12:49:20.17643 debug1: Local version string SSH-2.0-OpenSSH 4.3p2
Debian-9etch3
2008-11-22 12:49:20.17760 chroot("/var/run/sshd"): Operation not permitted
2008-11-22 12:49:20.17766 debug1: do cleanup
2008-11-22 12:49:20.17793 debug1: do cleanup


Output of vserver-info:
Versions:
                   Kernel: 2.6.26-1-vserver-amd64
                   VS-API: 0x00020303
             util-vserver: 0.30.216-pre2772; Nov 11 2008, 16:22:18

Features:
                       CC: gcc, gcc (Debian 4.3.2-1) 4.3.2
                      CXX: g++, g++ (Debian 4.3.2-1) 4.3.2
                 CPPFLAGS: ''
                   CFLAGS: '-Wall -g  -O2 -std=c99 -Wall -pedantic -W
-funit-at-a-time'
                 CXXFLAGS: '-g -O2 -ansi -Wall -pedantic -W -fmessage-length=0
-funit-at-a-time'
               build/host: x86 64-pc-linux-gnu/x86 64-pc-linux-gnu
             Use dietlibc: yes
       Build C++ programs: yes
       Build C99 programs: yes
           Available APIs: v13,net,v21,v22,v23,netv2
            ext2fs Source: e2fsprogs
    syscall(2) invocation: alternative
      vserver(2) syscall#: 236/glibc
               crypto api: beecrypt

Paths:
                   prefix: /usr
        sysconf-Directory: /etc
            cfg-Directory: /etc/vservers
         initrd-Directory: $(sysconfdir)/init.d
       pkgstate-Directory: /var/run/vservers
          vserver-Rootdir: /var/lib/vservers

Thanks,
Gilles



---
More than 2000 Scarlet customers don't pay a subscription anymore!
Join and surf free of charge! >> http://www.scarlet.be/nl/mgm