1834789 Members
2962 Online
110070 Solutions
New Discussion

Re: ssh not working

 
matthew mills
Frequent Advisor

ssh not working

I loaded openssh correctly but when I execute /usr/local/sbin/sshd as root I get the following error.
Could not load host key: /usr/local/etc/openssh/ssh_host_key
Could not load host key: /usr/local/etc/openssh/ssh_host_rsa_key
Could not load host key: /usr/local/etc/openssh/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.

so I tryed to create the rsa and dsa by using:
ssh-keygen -t rsa -f /usr/local/etc/openssh/ssh_host_rsa_key
ssh-keygen -t dsa -f /usr/local/etc/openssh/ssh_host_dsa_key

no luck! same error when I run sshd.


thanks for the help!
6 REPLIES 6
Zeev Schultz
Honored Contributor

Re: ssh not working

Check here:
http://docs.hp.com/hpux/onlinedocs/T1471-90006/00/00/12-con.html
Looks strange that ssh can't load these keys,they are created upon install time.Probably not so good install?

Zeev
So computers don't think yet. At least not chess computers. - Seymour Cray
Paul Sperry
Honored Contributor

Re: ssh not working

You need to uncomment the type of key that you are using in your sshd_config file, if it doesn't know where to find the key, it can't load them
Steven E. Protter
Exalted Contributor

Re: ssh not working

I'm attaching a word document that should help you.

This is probably a permissions issue. Pay close attention to what Chris says about permissions.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Zeev Schultz
Honored Contributor

Re: ssh not working

Ok,I guess that public keys are not created.
ssh use 2 keys - private and public.Go to
/usr/local/etc/openssh (or where keys are stored) and check for *.pub files.If they aren't sshd wouldn't boot.I guess they should
be created with ssh-keygen.By the way - does
ssh-keygen say something after you run it?Probably need more options (like -N "" ) or else?
So computers don't think yet. At least not chess computers. - Seymour Cray
Kevin Wright
Honored Contributor

Re: ssh not working

You need to create the ssh_host_key as well.
Ricardo Piantola
New Member

Re: ssh not working

Hi, friend!

I got the same message.
You have to regenerate your keys:
ssh-keygen -t rsa -f /usr/local/etc/openssh/ssh_host_rsa_key
ssh-keygen -t dsa -f /usr/local/etc/openssh/ssh_host_dsa_key

But do NOT enter a passfrase, only press enter.

After that, if you want to run sshd with user root, you have to modify the configuration file(sshd_config):
uncomment this line and change to "no".
UsePrivilegeSeparation no

Good Luck!!