View previous topic :: View next topic |
Author |
Message |
Heinzelmännchen Apprentice
Joined: 11 Mar 2004 Posts: 179 Location: MV, Germany
|
Posted: Thu May 26, 2005 12:01 pm Post subject: sshd läßt sich nicht stoppen bzw neustarten... |
|
|
Hallo,
ich habe einige Änderungen in der sshd_config vorgenommen und wollte draufhin den Dienst neustarten. Doch mehr als die 2 Roten Ausrufezeichen habe ich nicht bekommen. In den Logs zu ssh und everything war auch nix zufinden.
Habe dann /etc/init.d/sshd zap ausgeführt und dann den laufen Prozess mit killall sshd entfernt. Im Anschluß den Dienst neu gestartet.
Leider habe ich noch keine Veränderungen feststellen können im Bezug meiner Änderung an der Config. Wollte lediglich das Authorisiern von zwei Servern ohne Passwort realisieren. Dafür habe ich in der Config die Felder PubkeyAuthentication und AuthorizedKeysFile auskommentiert und angepasst. Doch bis jetzt leider ohne Erfolg. Doch ich weiß nun nicht inwiefern dies mit meinem oben beschriebenen Problem zusammenspielt.
Bin über jeden Hinweis zur Lösung der Probleme dankbar.
Viele Grüße,
Heinz _________________ Gute Dinge, will Weile haben! |
|
Back to top |
|
|
Donpasquale Apprentice
Joined: 03 Jan 2003 Posts: 150 Location: Munich
|
Posted: Fri May 27, 2005 10:28 am Post subject: |
|
|
poste doch bitte deine config kurz. ändere die vertraulichen werte einfach auf dummys. |
|
Back to top |
|
|
Heinzelmännchen Apprentice
Joined: 11 Mar 2004 Posts: 179 Location: MV, Germany
|
Posted: Fri May 27, 2005 12:07 pm Post subject: |
|
|
Hallo,
bin froh das sich einer mit das Problem annimmt. Erst einmal vielen Dank dafür.
Hier jetzt die sshd_config:
Code: | #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 .ssh2/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 no
#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 susceptibl
e to.
#GSSAPIEnableMITMAttack no
# 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' and 'PermitEmptyPasswords'
UsePAM yes
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive 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/bin/sftp-server
|
Ich hoffe es dient zur Lösung des Problems.
Viele Grüße,
Heinz _________________ Gute Dinge, will Weile haben! |
|
Back to top |
|
|
himpierre l33t
Joined: 31 Aug 2002 Posts: 867 Location: Berlin
|
Posted: Fri May 27, 2005 1:09 pm Post subject: |
|
|
Hallo.
Vielleicht verrätst Du uns, was Du mit den von Dir geplanten Änderungen zu erreichen versuchst. Ich meine "AuthorizedKeysFile" von .ssh nach .ssh2 umzukonfigurieren soll alles sein?
t. |
|
Back to top |
|
|
Heinzelmännchen Apprentice
Joined: 11 Mar 2004 Posts: 179 Location: MV, Germany
|
Posted: Fri May 27, 2005 1:21 pm Post subject: |
|
|
himpierre wrote: | Hallo.
Vielleicht verrätst Du uns, was Du mit den von Dir geplanten Änderungen zu erreichen versuchst. Ich meine "AuthorizedKeysFile" von .ssh nach .ssh2 umzukonfigurieren soll alles sein?
t. |
Mein Primär Ziel ist vorerst einmal sshd normal stoppen zukönnen und zu restarten.
Das Sekundär Ziel ist es, zwei Server bekannt zu machen ohne Passwort eingabe. Ich habe lediglich .ssh2/authorized_keys eingegeben, da in dem Verzeichnis des Users nur .ssh2 gab. _________________ Gute Dinge, will Weile haben! |
|
Back to top |
|
|
himpierre l33t
Joined: 31 Aug 2002 Posts: 867 Location: Berlin
|
Posted: Fri May 27, 2005 1:27 pm Post subject: |
|
|
Versuchst Du das Remote, oder sitzt Du vor der Kiste? Wenn Du davor sitzt, versuch doch mal alle ssh Prozesse zu killen. "ps auxww | grep ssh" und dann eben killen. Oder ssh mal aus dem Default Runlevel nehmen und rebooten. Oder mal Deine Konfigurationen in der sshd_config zurücknehmen. Versuch das halt erstmal alles.
Gruß
t.
ps: Irgendwie habe ich jetzt zu oft das Wort "versuchen" zu oft untergebracht, ich bitte den schlechten Stil zu entschuldigen. |
|
Back to top |
|
|
_hephaistos_ Advocate
Joined: 07 Apr 2004 Posts: 2694 Location: salzburg, austria
|
Posted: Fri May 27, 2005 1:47 pm Post subject: |
|
|
"gestörten" dient stoppen: /etc/init.d/<dienst> zap
cheers |
|
Back to top |
|
|
Heinzelmännchen Apprentice
Joined: 11 Mar 2004 Posts: 179 Location: MV, Germany
|
Posted: Fri May 27, 2005 3:45 pm Post subject: |
|
|
Hallo!
Habe alles wie himpierre beschrieben hat durch gezogen.
Geschaut welche Prozesse von ssh laufen. Diese entfernt und dann aus Default Runlevel genommen. Rechner neugestartet und mal sshd gestartet.
Das Resultat war das folgende:
Code: |
gentoo root # /etc/init.d/sshd start
* Generating Hostkey...
Error: unknown key type.
* Generating DSA-Hostkey...
illegal option -- d
Usage: ssh-keygen [options] [key1 key2 ...]
Where `options' are:
-b nnn Specify key strength in bits (e.g. 1024)
-t dsa | rsa Choose the key type.
-c comment Provide the comment.
-e file Edit the comment/passphrase of the key.
-p passphrase Provide passphrase.
-P Assume empty passphrase.
-?
-h Print this help text.
-q Suppress the progress indicator.
-1 file Convert a SSH 1.x key.
-i file Load and display information on `file'.
-D file Derive the public key from the private key 'file'.
-B number The number base for displaying key information (default 10).
-V Print ssh-keygen version number.
-r file Stir data from file to random pool.
-F file Dump fingerprint of file.
* Generating RSA-Hostkey...
illegal option -- f
Usage: ssh-keygen [options] [key1 key2 ...]
Where `options' are:
-b nnn Specify key strength in bits (e.g. 1024)
-t dsa | rsa Choose the key type.
-c comment Provide the comment.
-e file Edit the comment/passphrase of the key.
-p passphrase Provide passphrase.
-P Assume empty passphrase.
-?
-h Print this help text.
-q Suppress the progress indicator.
-1 file Convert a SSH 1.x key.
-i file Load and display information on `file'.
-D file Derive the public key from the private key 'file'.
-B number The number base for displaying key information (default 10).
-V Print ssh-keygen version number.
-r file Stir data from file to random pool.
-F file Dump fingerprint of file.
* Starting sshd...
sshd: SSH Secure Shell 3.2.9.1 (non-commercial version) on i586-pc-linux [ ok ]
|
_________________ Gute Dinge, will Weile haben! |
|
Back to top |
|
|
_hephaistos_ Advocate
Joined: 07 Apr 2004 Posts: 2694 Location: salzburg, austria
|
Posted: Fri May 27, 2005 4:00 pm Post subject: |
|
|
Heinzelmännchen wrote: |
Code: |
gentoo root # /etc/init.d/sshd start
* Generating Hostkey...
Error: unknown key type.
* Generating DSA-Hostkey...
* Starting sshd...
sshd: SSH Secure Shell 3.2.9.1 (non-commercial version) on i586-pc-linux [ ok ]
|
|
und gehts? |
|
Back to top |
|
|
himpierre l33t
Joined: 31 Aug 2002 Posts: 867 Location: Berlin
|
Posted: Fri May 27, 2005 5:42 pm Post subject: |
|
|
Quote: |
Error: unknown key type.
* Generating DSA-Hostkey...
illegal option -- d
|
Das ist doch riesengrosser Murks.
Code: |
mkdir /etc/ssh_backup
mv /etc/ssh/ssh_host* /etc/ssh_backup
/etc/init.d/ssh stop / zap / start
|
t. |
|
Back to top |
|
|
himpierre l33t
Joined: 31 Aug 2002 Posts: 867 Location: Berlin
|
Posted: Fri May 27, 2005 5:53 pm Post subject: |
|
|
Ha, ich habs, Du hast "ssh" emerged und nicht "openssh". Also wenn Du nicht ganz dringend "ssh" willst, würde ich empfehlen:
Code: |
emerge unmerge ssh
emerge openssh
|
t. |
|
Back to top |
|
|
Heinzelmännchen Apprentice
Joined: 11 Mar 2004 Posts: 179 Location: MV, Germany
|
Posted: Sat May 28, 2005 9:29 am Post subject: |
|
|
himpierre wrote: | Ha, ich habs, Du hast "ssh" emerged und nicht "openssh". Also wenn Du nicht ganz dringend "ssh" willst, würde ich empfehlen:
Code: |
emerge unmerge ssh
emerge openssh
|
t. |
Hallo und vielen Dank. Genau das war das Problem.
Viele Grüße,
Heinzelmännchen _________________ Gute Dinge, will Weile haben! |
|
Back to top |
|
|
|