Hallo zusammen,
seit Tagen durchwühle ich das Internet um eine Lösung oder eine Idee zu finden, warum ich nicht per SSH auf meinen Server komme. Eine Verbindung per VNC funktioniert dagegen einwandfrei.
Clientrechner: Win7 und Putty
Server: OS: Suse 12.1 (64bit); Firewall: keine, alle Updates durchgeführt
Netzwerk: internes Heimnetzwerk, Client per WLan, Server hängt per Kabel am Router.
Das merkwürdige dabei ist, dass es zweimal funktioniert hat. Hatte abends die sshd_config geändert und konnte mich verbinden. Zufrieden den Server ausgeschaltet (befindet sich noch in der Aufbauphase), am nächsten Tag eingeschaltet, seitdem keine Verbindung mehr per ssh.
Ich rufe am Client Puty auf, es erfolgt ein Verbindungsversuch aber keine "Login:" Ausgabe.
Die Daten von Putty habe ich mal mitgeschnitten:
Event Log: Server unexpectedly closed network connection
Die vollständigen Daten findet ihr in der angehängten Datei (Wie kann ich eigentlich einen Link draufsetzen?)
Am Server gibt es in /var/log/messages folgende Einträge:
Oct 2 08:50:13 AGHnetServer sshd[5955]: Set /proc/self/oom_score_adj to 0
Oct 2 08:50:13 AGHnetServer sshd[5955]: Connection from 10.3.2.10 port 54201
Oct 2 08:54:29 AGHnetServer sshd[6040]: Set /proc/self/oom_score_adj to 0
Oct 2 08:54:29 AGHnetServer sshd[6040]: Connection from 10.3.2.10 port 54246
Mit der Zeile /proc/self/oom_score_adj kann ich nichts anfangen. In der Zeile mit der Verbindung fehlt mir noch SSH2.
Der Vollständigkeit halber noch die sshd_config:
# $OpenBSD: sshd_config,v 1.82 2010/09/06 17:10:19 naddy Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# 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
#AddressFamily any
AddressFamily inet
#ListenAddress 0.0.0.0
#ListenAddress ::
# The default requires explicit activation of protocol 1
Protocol 2
# 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
#HostKey /etc/ssh/ssh_host_ecdsa_key
# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 1024
# Logging
# obsoletes QuietMode and FascistLogging
SyslogFacility DAEMON
LogLevel VERBOSE
# Authentication:
#LoginGraceTime 2m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
#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 no
# similar for protocol version 2
#HostbasedAuthentication no
# 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
#KerberosGetAFSToken no
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
# Set this to 'yes' to enable support for the deprecated 'gssapi' authentication
# mechanism to OpenSSH 3.8p1. The newer 'gssapi-with-mic' mechanism is included
# in this release. The use of 'gssapi' is deprecated due to the presence of
# potential man-in-the-middle attacks, which 'gssapi-with-mic' is not susceptible to.
#GSSAPIEnableMITMAttack no
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM yes
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
Compression yes
ClientAliveInterval 3
ClientAliveCountMax 10
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
PermitTunnel yes
#ChrootDirectory none
# no default banner path
#Banner none
# override default of no subsystems
Subsystem sftp /usr/lib/ssh/sftp-server
#AllowTcpForwarding yes
#Compression yes
#MaxAuthTries 6
#PrintMotd yes
#PubkeyAuthentication no
#RSAAuthentication no
# This enables accepting locale enviroment variables LC_* LANG, see sshd_config(5).
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# ForceCommand cvs server
Alles anzeigen
Ich habe bereits einiges ausprobiert:
1. in Win7 die Firewall deaktiviert - ohne Erfolg
2. in der Win Registry und im Suse den ausgetauschten Schlüssel gelöscht (vielleicht hatte ich unbeabsichtigt irgendetwas irgentwo im Suse verbogen) - ohne Erfolg, Schlüssel wird nicht ausgetauscht
3. Ich habe noch einen ext. Server mit Suse 10.x bei einem Provider für meine HP. Um auszuschließen, dass ich ein Win7 Problem habe, mußte ich dort erstmal die SSH Verbindung testen. Also es scheint mit Win7 etwas schwieriger zu sein, denn der 1. Verbindungaufbau klappt selten. Spätestens der 4. funktioniert. Warum auch immer.
4. Jetzt habe ich noch einen Test gemacht und bin mit einem anderen Client, auf dem WinXP läuft per SSH auf meinen Heimserver gegangen und siehe da, kein Problem.
Jetzt zu meinen Fragen:
1. Ist meine sshd_config so ok? Wenn ja,
2. warum bekomme ich mit meinem Win7-Client keine Verbindung? (Vielleicht ist die Frage hier ja falsch, aber wo sollte ich sie sonst stellen)
3. An welchen Einstellungen muss ich drehen, damit es funktioniert?
Ich danke euch allen schon jetzt für eure Mühe und eure Ideen.
Gruß Andreas