Page 1 of 1

ssh zugriff geht nicht mehr (ssh_exchange_identification)

Posted: 2004-11-12 13:38
by pic
Hallo,

ich habe folgendes Problem:
Wenn ich ein ssh connect auf mich oder von einem anderen pc auf mich mache, kommt die meldung "ssh_exchange_identification: Connection closed by remote host".

os: slackware 8.1

in der syslog steht:
Nov 12 13:32:26 gravion sshd[1597]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.
Nov 12 13:32:26 gravion sshd[1597]: fatal: Cannot bind any address.
in der hosts.allow steht
sshd : ALL : ALLOW
in der hosts.deny nichts.

ssh hab ich über den inetd eingebunden.

weiß jemand rat?
gravion:/etc/ssh$ cat sshd_config
# $OpenBSD: sshd_config,v 1.65 2003/08/28 12:54:34 markus Exp $

# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.

#Port 22
#Protocol 2,1
#ListenAddress 0.0.0.0
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768

# Logging
#obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin yes
#StrictModes yes

#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication yes
# similar for protocol version 2
#HostbasedAuthentication yes
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCreds yes

# Set this to 'yes' to enable PAM authentication (via challenge-response)
# and session processing. Depending on your PAM configuration, this may
# bypass the setting of 'PasswordAuthentication'
#UsePAM yes

#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#KeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression yes
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10

# no default banner path
#Banner /some/path

# override default of no subsystems
Subsystem sftp /usr/libexec/sftp-server
gravion:/etc/ssh$ cat ssh_config
# $OpenBSD: ssh_config,v 1.19 2003/08/13 08:46:31 markus Exp $

# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.

# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
# 3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.

# Site-wide defaults for various options

Host localhost
# ForwardAgent no
# ForwardX11 no
# RhostsRSAAuthentication no
# RhostsAuthentication no
# RSAAuthentication no
# PasswordAuthentication yes
# HostbasedAuthentication no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
# Protocol 2,1
# Cipher 3des
# Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
# EscapeChar ~

Re: ssh zugriff geht nicht mehr (ssh_exchange_identification)

Posted: 2004-11-12 13:44
by lufthansen
lsof -i :22

Re: ssh zugriff geht nicht mehr (ssh_exchange_identification)

Posted: 2004-11-12 13:47
by pic
kommt nichts zurück
gravion:/$ lsof -i :22
gravion:/$
Evtl. hilft das weiter?
ssh -v -l root gravion
OpenSSH_3.7.1p1, SSH protocols 1.5/2.0, OpenSSL 0.9.7d 17 Mar 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to gravion [172.16.98.48] port 22.
debug1: Connection established.
debug1: identity file /root/.ssh/identity type 0
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type 2
ssh_exchange_identification: Connection closed by remote host
debug1: Calling cleanup 0x80632f0(0x0)
gravion:/var/log# netstat -plen --tcp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
tcp 0 0 0.0.0.0:515 0.0.0.0:* LISTEN 0 467 495/lpd Waiting
tcp 0 0 0.0.0.0:37 0.0.0.0:* LISTEN 0 440 482/inetd
tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN 0 483 504/sendmail: accep
tcp 0 0 0.0.0.0:79 0.0.0.0:* LISTEN 0 447 482/inetd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 0 409 468/rpc.portmap
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN 0 517 523/X
tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN 0 448 482/inetd
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 0 442 482/inetd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 443 482/inetd
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN 0 444 482/inetd
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 0 482 504/sendmail: accep

Re: ssh zugriff geht nicht mehr (ssh_exchange_identification)

Posted: 2004-11-12 13:58
by lufthansen
für lsof mla als root aus =)

Re: ssh zugriff geht nicht mehr (ssh_exchange_identification)

Posted: 2004-11-12 14:03
by pic
schon besser =)
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
inetd 1755 root 7u IPv4 21922 TCP *:ssh (LISTEN)