You are not logged in.
Pages: 1
Hey,
I have some problem with SSHD on a new archlinux install. The daemon does not start, so when I try to run it manually, it gives me this error.
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 2. Could not load host key
sshd: no hostkeys available -- exiting
Indeed, I do not have those files in the ssh directory. How can I generate them?
Offline
Is there a reason why you start the daemon by hand instead of using the init script? If not just start it via
/etc/rc.d/sshd start
If you need to start it by hand for some reasoin, you might want to take a look at the init script file which checks for the existance of the files you mentioned and creates them if they are missing.
Offline
Is there a reason why you start the daemon by hand instead of using the init script? If not just start it via
/etc/rc.d/sshd start
If you need to start it by hand for some reasoin, you might want to take a look at the init script file which checks for the existance of the files you mentioned and creates them if they are missing.
Well, I DID started the server by script. However, even then the files do not exist anywhere on my system. First thing I started it by script
Offline
That's odd I just checked on my system which I freshly installed and running the script created the files for me.
Anyway executig these lines taken from the script should create those files needed by sshd.
/usr/bin/ssh-keygen -t rsa1 -N "" -f /etc/ssh/ssh_host_key >/dev/null;
/usr/bin/ssh-keygen -t rsa -N "" -f /etc/ssh/ssh_host_rsa_key >/dev/null;
/usr/bin/ssh-keygen -t dsa -N "" -f /etc/ssh/ssh_host_dsa_key >/dev/null;
Offline
Thanks, it worked.
The only problem is, is that when I try to connect I get : Connection closed by remote host.
I use the -vv to see what's wrong and it gives me this ...
debug1: identity file /home/bangel/.ssh/identity type -1
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type '-----END'
and then it identify's id_rsa to type -1 and id_dsa also to -1.
I tried to use the ssh-keygen but it gives the same error!
Offline
Do you have any settings in "/home/bangel/.ssh/config" file? If so they can possibly make your ssh client to use improper identity file.
Have you tried to view your key files placed in "/home/bangel/.ssh"? Maybe the're malformed (it appears so from your debug messages).
Do you have a proper public key added to ".ssh/authorized_keys" on your target machine?
It's not the best thing when they call you a "member" you know…
Offline
The only problem is, is that when I try to connect I get : Connection closed by remote host.
The solution to that problem is to edit /etc/hosts.allow and add:
sshd: xxx.xxx.xxx.xxx
where xxx.xxx.xxx.xxx are the corresponding digits of the machine you want to allow access.
You could use sshd:ALL but that is NOT wise.
Hope this helps.
R.
Offline
Thanks a lot, it worked, did not used the ALL but added a line for each host
It appears the key were good, it was the hosts.allow problem.
Offline
Glad it worked.
You may wont to mark this thread [solved] so other people can use it as a reference when looking for similar problems.
R.
Offline
Pages: 1