[gelöst] sshd Connection reset by peer

Alle weiteren Dienste, die nicht in die drei oberen Foren gehören.
Antworten
Benutzeravatar
feldmaus
Beiträge: 1308
Registriert: 14.06.2005 23:13:22
Lizenz eigener Beiträge: GNU General Public License
Wohnort: Deutschland

[gelöst] sshd Connection reset by peer

Beitrag von feldmaus » 10.03.2009 20:34:01

Hi Alle,

ich wollte auf meinem Debian Lenny(Workstation) einen ssh Server
installieren um mit Firewall Builder meine firewall bequem zu installieren.

Dabei ist bei mir dieser Fehler aufgetreten:

Code: Alles auswählen

markus@feld-bert:~$ ssh markus@localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established.
RSA key fingerprint is 55:54:f1:da:0f:28:ce:1b:69:9b:33:b3:c9:40:e2:37.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
markus@localhost's password: 
Read from remote host localhost: Connection reset by peer
Connection to localhost closed.
An der Server Konfiguration habe ich nichts geändert. Habe
den SSH Server gerade frisch installiert. Fragen wurden
mir zur Einrichtung des SSH Servers auch keine gestellt.

Hat Jemand eine Idee ?

Grüße Markus
Zuletzt geändert von feldmaus am 11.03.2009 10:44:08, insgesamt 1-mal geändert.

Benutzeravatar
feldmaus
Beiträge: 1308
Registriert: 14.06.2005 23:13:22
Lizenz eigener Beiträge: GNU General Public License
Wohnort: Deutschland

Re: sshd Connection reset by peer

Beitrag von feldmaus » 10.03.2009 20:54:19

So habe jetzt mal in einer Konsole den sshd per Hand gestartet,
und dann auf einer anderen Konsole den localen ssh Server connected:
feld-bert:/home/markus# /usr/sbin/sshd -d
debug1: sshd version OpenSSH_5.1p1 Debian-5
debug1: read PEM private key done: type RSA
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: private host key: #0 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024
debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024
debug1: private host key: #1 type 2 DSA
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
debug1: Bind to port 22 on ::.
Server listening on :: port 22.
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
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
Connection from 127.0.0.1 port 53600
debug1: Client protocol version 2.0; client software version OpenSSH_5.1p1 Debian-5
debug1: match: OpenSSH_5.1p1 Debian-5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1p1 Debian-5
debug1: permanently_set_uid: 112/65534
debug1: list_hostkey_types: ssh-rsa,ssh-dss
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST received
debug1: SSH2_MSG_KEX_DH_GEX_GROUP sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_INIT
debug1: SSH2_MSG_KEX_DH_GEX_REPLY sent
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: KEX done
debug1: userauth-request for user markus service ssh-connection method none
debug1: attempt 0 failures 0
debug1: PAM: initializing for "markus"
debug1: PAM: setting PAM_RHOST to "localhost"
debug1: PAM: setting PAM_TTY to "ssh"
Failed none for markus from 127.0.0.1 port 53600 ssh2
debug1: userauth-request for user markus service ssh-connection method password
debug1: attempt 1 failures 0
debug1: PAM: password authentication accepted for markus
debug1: do_pam_account: called
Accepted password for markus from 127.0.0.1 port 53600 ssh2
debug1: monitor_child_preauth: markus has been authenticated by privileged process
debug1: PAM: establishing credentials
User child is on pid 6669
debug1: SELinux support enabled
debug1: PAM: establishing credentials
debug1: permanently_set_uid: 1000/1000
ssh_selinux_getctxbyname: Failed to get default SELinux security context for markus
ssh_selinux_setup_exec_context: Failed to set SELinux execution context for markus
*** glibc detected *** sshd: markus [priv]: free(): invalid pointer: 0xbf81ee38 ***
======= Backtrace: =========
/lib/i686/cmov/libc.so.6[0xb7ab1624]
/lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7ab3826]
/lib/libselinux.so.1(freecon+0x1d)[0xb7e59f2d]
sshd: markus [priv][0xb7f1195d]
sshd: markus [priv][0xb7ed2c9a]
sshd: markus [priv](main+0x31a8)[0xb7ec4ce8]
/lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7a59455]
sshd: markus [priv][0xb7ec0771]
======= Memory map: ========
b7600000-b7621000 rw-p b7600000 00:00 0
. . .
b7e50000-b7e670debug1: do_cleanup
debug1: PAM: cleanup
debug1: PAM: deleting credentials
debug1: PAM: closing session
Hat Jemand Plan was das mit SELinux context soll ?

Grüße Markus

Benutzeravatar
feldmaus
Beiträge: 1308
Registriert: 14.06.2005 23:13:22
Lizenz eigener Beiträge: GNU General Public License
Wohnort: Deutschland

Re: sshd Connection reset by peer

Beitrag von feldmaus » 11.03.2009 10:43:40

So ich habe den Fehler wie erhofft in SELinux gefunden, alerdings
weiß ich nicht in wie fern SELinux auf meinem System wichtig ist ?

Folgende config Datei anpassen </etc/selinux/config>:

Code: Alles auswählen

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
Grüße Markus

Antworten