19. januar 2004 - 18:33Der er
11 kommentarer og 2 løsninger
SSH virker ikke efter nogle sekunder
Jeg har fornylig installeret en maskine med Debian. Da maskinen ikke har en skærm til har jeg installeret sshd. sshd har nu kørt i et par dage og der har ikke været nogle problemer - men pludselig i går kunne jeg ikke logge ind (jeg bruger putty), vinduet lukker når jeg forsøger at connecte. Jeg satte en skærm til og skrev:
# /etc/init.d/ssh restart
også kunne jeg logge ind igen. Efter omkring 1 min kan jeg så ikke logge ind igen, så skal jeg ind og restarte ssh så kan jeg logge ind igen.
Jeg har også prøvet:
# dpkg-reconfigure ssh
dette virker heller ikke. Til sidst opgav jeg og installerete telnetd - dette virker rigtig fint.
Er der nogen der kan løse det problem sådan at jeg kan bruge ssh igen?
I dette særtema ser vi på, hvordan cloud og AI bliver fundamentet for virksomhedernes digitale forretning, og hvordan de nye muligheder for automatisering og forretningsværdi kan udnyttes uden at miste overblik, sikkerhed og menneskelig kontrol.
Du kunne prøve at kigge i loggen. Den kan tit afsløre alle mulige fejl. Prøv.. tail -f /var/log/messages ..eller.. tail -f /var/log/auth.log mens du kører løs med din ssh forbindelse, og se om det kaster lys over sagen.
sandbox > Efter en reboot her i weekenden har problemet ikke været der mere. Jeg synes ikke at kunne se nogen fejl i loggen, ikke andet end at ssh bare ikke kørte..
Følgende har jeg stående i sshd_config: ------------------------------------------------------------------------------------- # See the sshd(8) manpage for defails
# What ports, IPs and protocols we listen for Port 22 # Use these options to restrict which interfaces/protocols sshd will bind to #ListenAddress :: #ListenAddress 0.0.0.0 Protocol 2,1 # HostKeys 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 #Privilege Separation is turned on for security UsePrivilegeSeparation yes
# ...but breaks Pam auth via kbdint, so we have to turn it off # Use PAM authentication via keyboard-interactive so PAM modules can # properly interface with the user (off due to PrivSep) PAMAuthenticationViaKbdInt no # Lifetime and size of ephemeral version 1 server key KeyRegenerationInterval 3600 ServerKeyBits 768
# rhosts authentication should not be used RhostsAuthentication no # Don't read the user's ~/.rhosts and ~/.shosts files IgnoreRhosts yes # For this to work you will also need host keys in /etc/ssh_known_hosts RhostsRSAAuthentication no # similar for protocol version 2 HostbasedAuthentication no # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication #IgnoreUserKnownHosts yes
# To enable empty passwords, change to yes (NOT RECOMMENDED) PermitEmptyPasswords no
# Uncomment to disable s/key passwords #ChallengeResponseAuthentication no
# To disable tunneled clear text passwords, change to no here! PasswordAuthentication yes
# Package generated configuration file # See the sshd(8) manpage for defails
# What ports, IPs and protocols we listen for Port 22 # Use these options to restrict which interfaces/protocols sshd will bind to #ListenAddress :: #ListenAddress 0.0.0.0 Protocol 2,1 # HostKeys 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 #Privilege Separation is turned on for security UsePrivilegeSeparation yes
# ...but breaks Pam auth via kbdint, so we have to turn it off # Use PAM authentication via keyboard-interactive so PAM modules can # properly interface with the user (off due to PrivSep) PAMAuthenticationViaKbdInt no # Lifetime and size of ephemeral version 1 server key KeyRegenerationInterval 3600 ServerKeyBits 768
# rhosts authentication should not be used RhostsAuthentication no # Don't read the user's ~/.rhosts and ~/.shosts files IgnoreRhosts yes # For this to work you will also need host keys in /etc/ssh_known_hosts RhostsRSAAuthentication no # similar for protocol version 2 HostbasedAuthentication no # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication #IgnoreUserKnownHosts yes
# To enable empty passwords, change to yes (NOT RECOMMENDED) PermitEmptyPasswords no
# Uncomment to disable s/key passwords #ChallengeResponseAuthentication no
# To disable tunneled clear text passwords, change to no here! PasswordAuthentication yes
# To change Kerberos options #KerberosAuthentication no #KerberosOrLocalPasswd yes #AFSTokenPassing no #KerberosTicketCleanup no
# Kerberos TGT Passing does only work with the AFS kaserver #KerberosTgtPassing yes
X11Forwarding yes X11DisplayOffset 10 PrintMotd no #PrintLastLog no KeepAlive yes #UseLogin no
Beklager forresten den lange svar tid, men der kom nogle eksamener i vejen.. ved godt at det ikke er en undskyldning, men havde glemt alt om dette spm..
Synes godt om
Slettet bruger
27. januar 2004 - 13:56#8
Der var ikke noget, der så mistænkeligt ud i din config.
Er der en NAT-router mellem din server og den maskine, du ssh'er fra?
Nah.. Jeg sad alligevel og rodede med logs på det tidspunkt :)
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.