View previous topic :: View next topic |
Author |
Message |
e-nigma n00b
Joined: 29 Dec 2003 Posts: 42 Location: Luxembourg
|
Posted: Fri Apr 16, 2004 10:31 am Post subject: sshd: could not load host keys |
|
|
Hi, Im pretty new to ssh, and I've just set-up ssh, or I think I did. But when I run Code: | # /etc/init.d/sshd start | I always get this: Code: | root@gollum tux # /etc/init.d/sshd start
* Starting sshd...
Could not load host key: /etc/ssh/ssh_host_key
Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
Disabling protocol version 1. Could not load host key
Disabling protocol version 2. Could not load host key
sshd: no hostkeys available -- exiting. [ !! ] |
I've already generated keys in /etc/ssh/:
Code: | root@gollum tux # ls -la /etc/ssh
total 136
drwxr-xr-x 3 root root 4096 Apr 16 10:52 .
drwxr-xr-x 75 root root 4096 Apr 16 10:50 ..
drwxr-xr-x 2 root root 4096 Apr 16 10:53 authorized_keys
-rw-r--r-- 1 root root 88039 Apr 16 10:51 moduli
-rw-r--r-- 1 root root 1139 Apr 16 10:55 ssh_config
-rw------- 1 root root 744 Apr 16 10:39 ssh_host_dsa_key
-rw-r--r-- 1 root root 601 Apr 16 10:39 ssh_host_dsa_key.pub
-rw------- 1 root root 526 Apr 16 10:38 ssh_host_key
-rw-r--r-- 1 root root 330 Apr 16 10:38 ssh_host_key.pub
-rw------- 1 root root 951 Apr 16 10:38 ssh_host_rsa_key
-rw-r--r-- 1 root root 221 Apr 16 10:38 ssh_host_rsa_key.pub
-rw------- 1 root root 2411 Apr 16 10:57 sshd_config |
sshd_config:
Code: | root@gollum 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/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
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 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
# 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/lib/misc/sftp-server |
well,I hope someone can help me... _________________ 2B||(!2B) - that's the question. |
|
Back to top |
|
|
kpack Tux's lil' helper
Joined: 29 Mar 2004 Posts: 137
|
Posted: Fri Apr 16, 2004 6:44 pm Post subject: |
|
|
Did you generate the keys in /etc/ssh manually? I'm not positive, but I think the sshd init script does it for you automatically the first time you start the daemon. If you did it manually, did you assign a passphrase? If so, that may be your problem. Regenerate the keys with no passphrase. |
|
Back to top |
|
|
e-nigma n00b
Joined: 29 Dec 2003 Posts: 42 Location: Luxembourg
|
Posted: Sun Apr 18, 2004 1:00 am Post subject: |
|
|
Thanks, it worked. I just regenereted the keys without passphrase... Well I still get some warnigng about my keys when logging in, but It seems to work well _________________ 2B||(!2B) - that's the question. |
|
Back to top |
|
|
krusty_ar Guru
Joined: 03 Oct 2002 Posts: 560 Location: Rosario, Argentina
|
|
Back to top |
|
|
|