• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

ssh nicht mehr möglich

byron1778

Hacker
Hallo Forum,

leider weiss ich nciht mehr weiter.

Ich kann mich nicht mehr auf eine bestimmte Maschine verbinden von allen anderen aus !
Auch ein direktes verbinden ist nicht mehr möglich, d. h. ein verbinden indem man es direkt ueber putty zB. versucht.

Es öffnet sich fuer eine hundertstel Sekunde die Conosole der Maschine, auf die man sich verbinden will und dann schliesst er sie sofort wieder.
Man bekommt aber keine Fehlermeldung noch sonst irgendwas.

Ein dmesg hat auch nichts gebracht, ebenso wenig wie ein kill -1 auf die Process - ID.

Weiss jemand vll an was das liegen kann ?

Es wurde nichts in der Config verändert, sondern nur ein Neustart der Maschine gemacht !

Hier die sshd_config



  • # Only v2 (recommended)
    Protocol 2

    # Both v1 and v2 (not recommended)
    #Protocol 2,1

    # Only v1 (not recommended)
    #Protocol 1

    # Listen port (the IANA registered port number for ssh is 22)
    Port 22

    # The default listen address is all interfaces, this may need to be changed
    # if you wish to restrict the interfaces sshd listens on for a multi homed host.
    # Multiple ListenAddress entries are allowed.

    # IPv4 only
    #ListenAddress 0.0.0.0
    # IPv4 & IPv6
    ListenAddress ::

    # Port forwarding
    AllowTcpForwarding no

    # If port forwarding is enabled, specify if the server can bind to INADDR_ANY.
    # This allows the local port forwarding to work when connections are received
    # from any remote host.
    GatewayPorts no

    # X11 tunneling options
    X11Forwarding yes
    X11DisplayOffset 10
    X11UseLocalhost yes

    # The maximum number of concurrent unauthenticated connections to sshd.
    # start:rate:full see sshd(1) for more information.
    # The default is 10 unauthenticated clients.
    #MaxStartups 10:30:60

    # Banner to be printed before authentication starts.
    #Banner /etc/issue

    # Should sshd print the /etc/motd file and check for mail.
    # On Solaris it is assumed that the login shell will do these (eg /etc/profile).
    PrintMotd no
    UseLogin yes

    # KeepAlive specifies whether keep alive messages are sent to the client.
    # See sshd(1) for detailed description of what this means.
    # Note that the client may also be sending keep alive messages to the server.
    KeepAlive yes

    # Syslog facility and level
    SyslogFacility auth
    LogLevel info

    #
    # Authentication configuration
    #

    # Host private key files
    # Must be on a local disk and readable only by the root user (root:sys 600).
    HostKey /etc/ssh/ssh_host_rsa_key
    HostKey /etc/ssh/ssh_host_dsa_key

    # Default Encryption algorithms and Message Authentication codes
    #Ciphers aes128-ctr,aes128-cbc,arcfour,3des-cbc,blowfish-cbc
    #MACS hmac-md5,hmac-sha1,hmac-sha1-96,hmac-md5-96

    # Length of the server key
    # Default 768, Minimum 512
    ServerKeyBits 768

    # sshd regenerates the key every KeyRegenerationInterval seconds.
    # The key is never stored anywhere except the memory of sshd.
    # The default is 1 hour (3600 seconds).
    KeyRegenerationInterval 3600

    # Ensure secure permissions on users .ssh directory.
    StrictModes yes

    # Length of time in seconds before a client that hasn't completed
    # authentication is disconnected.
    # Default is 600 seconds. 0 means no time limit.
    LoginGraceTime 600

    # Maximum number of retries for authentication
    # Default is 6. Default (if unset) for MaxAuthTriesLog is MaxAuthTries / 2
    MaxAuthTries 6
    MaxAuthTriesLog 3

    # Are logins to accounts with empty passwords allowed.
    # If PermitEmptyPasswords is no, pass PAM_DISALLOW_NULL_AUTHTOK
    # to pam_authenticate(3PAM).
    PermitEmptyPasswords no

    # To disable tunneled clear text passwords, change PasswordAuthentication to no.
    PasswordAuthentication yes

    # Use PAM via keyboard interactive method for authentication.
    # Depending on the setup of pam.conf(4) this may allow tunneled clear text
    # passwords even when PasswordAuthentication is set to no. This is dependent
    # on what the individual modules request and is out of the control of sshd
    # or the protocol.
    PAMAuthenticationViaKBDInt yes

    # Are root logins permitted using sshd.
    # Note that sshd uses pam_authenticate(3PAM) so the root (or any other) user
    # maybe denied access by a PAM module regardless of this setting.
    # Valid options are yes, without-password, no.
    PermitRootLogin no

    # sftp subsystem
    Subsystem sftp /usr/lib/ssh/sftp-server


    # SSH protocol v1 specific options
    #
    # The following options only apply to the v1 protocol and provide
    # some form of backwards compatibility with the very weak security
    # of /usr/bin/rsh. Their use is not recommended and the functionality
    # will be removed when support for v1 protocol is removed.

    # Should sshd use .rhosts and .shosts for password less authentication.
    IgnoreRhosts yes
    RhostsAuthentication no

    # Rhosts RSA Authentication
    # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts.
    # If the user on the client side is not root then this won't work on
    # Solaris since /usr/bin/ssh is not installed setuid.
    RhostsRSAAuthentication no

    # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication.
    #IgnoreUserKnownHosts yes

    # Is pure RSA authentication allowed.
    # Default is yes
    RSAAuthentication yes

Wenn mir jemand vll einen Tipp geben könnte woran das Problem liegt ?

Danke vielmals

mfG
Byron
 
Als erste Frage: Ist der sshd mit hochgekommen nach dem Neustart? Evtl. mal einen Moni und Tastatur an die Kiste hängen. Ansonsten mal den Log-Level erhöhen und schauen was mit deinen Anfragen gemacht wird.
 
OP
B

byron1778

Hacker
Hallo!

Der ssh hat selbst gestartet mit dem Hochfahren der Maschine !!

Ich habe nun den versucht den LOGLEVEL zu erhöhen, bin mir aber nicht sicher, ob ich es richtig getan habe.
Unterlagen dazu habe ich mir im Internet durchgelsen, nur ob ich sie richtig verstanden habe, ist etwas anderes.

Habe folgende Zeile eingefügt in die /etc/syslog.conf



  • *.crit /var/log/authlog

Anmerkung: Ist ein Solaris 10 OS. Ein svcadm disable und enable ssh habe ich auch schon durchprobiert !
 
OP
B

byron1778

Hacker
Hallo !

Den LogLevel vom SSH habe ich nun auf DEBUG3 eingestellt.
Wo sollte er aber jetzt alles hinschreiben ?

Ebenso habe ich noch probeweise sshd mit -ddd aufgeruden

Dabei bekam ich folgende Ausgabe



  • Accepted keyboard-interactive for radmin from 10.101.7.3 port 4704 ssh2
    debug2: Waiting for monitor
    debug2: Monitor pid 8729, unprivileged child pid 8732
    debug2: Monitor signalled readiness
    debug3: Setting handler to forward re-key packets to monitor
    debug2: Unprivileged server process dropping privileges
    debug1: permanently_set_uid: 10001/10001
    debug1: Entering interactive session for SSH2.
    debug1: fd 7 setting O_NONBLOCK
    debug1: fd 9 setting O_NONBLOCK
    debug1: server_init_dispatch_20
    debug3: server_init_dispatch_20 -- should we dispatch_set(KEXINIT) here? 1 && !0
    debug3: server_init_dispatch_20 -- skipping dispatch_set(KEXINIT) in unpriv proc
    debug2: Monitor started
    monitor debug3: Recording SSHv2 session login in wtmpx
    monitor debug3: not writing utmpx entry
    monitor debug1: Entering monitor loop.
    monitor debug1: fd 4 setting O_NONBLOCK
    monitor debug1: fd 10 setting O_NONBLOCK
    debug1: server_input_channel_open: ctype session rchan 256 win 16384 max 16384
    debug1: input_session_request
    debug1: channel 0: new [server-session]
    debug1: session_new: init
    debug1: session_new: session 0
    debug1: session_open: channel 0
    debug1: session_open: session 0: link with channel 0
    debug1: server_input_channel_open: confirm session
    debug1: server_input_channel_req: channel 0 request pty-req reply 1
    debug1: session_by_channel: session 0 channel 0
    debug1: session_input_channel_req: session 0 req pty-req
    debug1: Allocating pty.
    debug1: session_pty_req: session 0 alloc /dev/pts/2
    debug3: tty_parse_modes: SSH2 n_bytes 16
    debug3: tty_parse_modes: 3 127
    debug3: tty_parse_modes: ispeed 38400
    debug3: tty_parse_modes: ospeed 38400
    debug1: server_input_channel_req: channel 0 request shell reply 1
    debug1: session_by_channel: session 0 channel 0
    debug1: session_input_channel_req: session 0 req shell
    debug1: fd 4 setting TCP_NODELAY
    debug1: fd 11 setting O_NONBLOCK
    debug2: fd 10 is O_NONBLOCK
    debug3: channel_set_wait_for_exit 0, 1 (type: 4)
    debug1: Received SIGCHLD.
    debug1: session_by_pid: pid 8734
    debug1: session_exit_message: session 0 channel 0 pid 8734
    debug1: channel request 0: exit-status
    debug3: channel_set_wait_for_exit 0, 0 (type: 4)
    debug1: session_exit_message: release channel 0
    debug1: channel 0: write failed
    debug1: channel 0: close_write
    debug1: channel 0: output open -> closed
    debug1: session_close: session 0 pid 8734
    debug1: session_pty_cleanup: session 0 release /dev/pts/2
    debug3: Recording SSHv2 channel login in utmpx/wtmpx
    debug2: notify_done: reading
    debug1: channel 0: read<=0 rfd 11 len 0
    debug1: channel 0: read failed
    debug1: channel 0: close_read
    debug1: channel 0: input open -> drain
    debug1: channel 0: ibuf empty
    debug1: channel 0: send eof
    debug1: channel 0: input drain -> closed
    debug1: channel 0: send close
    debug3: channel 0: will not send data after close
    debug1: channel 0: rcvd close
    debug3: channel 0: will not send data after close
    debug1: channel 0: is dead
    debug1: channel 0: garbage collecting
    debug1: channel_free: channel 0: server-session, nchannels 1
    debug3: channel_free: status: The following connections are open:
    #0 server-session (t4 r256 i3/0 o3/0 fd -1/-1)

    debug3: channel_close_fds: channel 0: r -1 w -1 e -1
    Connection closed by 10.101.7.3
    Closing connection to 10.101.7.3
    monitor debug1: Monitor received SIGCHLD.
    monitor debug3: Recording SSHv2 session logout in wtmpx
    monitor debug3: not writing utmpx entry
 
Oben