Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

openssh: could not load..

Status
Not open for further replies.

Gabriel2010

Technical User
Nov 14, 2003
82
US
Hello

1. Installed latest openssl
2. installed latest openssh (tar.gz)
3. openssh: ./configure, make, make install
4. This says “install the OpenSSH binaries in /usr/local/bin, configuration files in /usr/local/etc, the server in /usr/local/sbin, etc.”
5. Followed this to setup the /usr/local/openssh-3.81p1/sshd_config file
5. was not getting connection. "reset by peer'
6. Looks like this tar.gz install did not use xinetd to start/stop sshd, or the /etc/init.d/sshd restart . since none of these commands work

7. To stop & restart sshd, i used this command: /usr/local/openssh-3.8.1p1/sshd. I have verified this when I do a ps aux | grep sshd

8. Edited the /etc/rc.d/rc.local and added;
echo "Starting sshd ...." /usr/local/sbin/sshd

9. started the sshd again

10. did a search for sshd_config and noticed another file of same name in /usr/local/etc/ There are two locations, one there & one I have been modifying in /usr/local/openssh-3.8.1p1/
11. Made a backup copy of the one in /usr/local/etc and copied the modified & the one I thought was being used in /usr/local/openssh-3.8.1p1 to /usr/local/etc
12. Stop, started sshd using: /usr/local/openssh-3.8.1p1/sshd command and got:
could not load host key: /etc/ssh/ssh_host_rsa_key
disabling protocol version 2. could not load host key
sshd: no hostkeys available -- exiting

13. I did a search for ssh_host_rsa_key and it was found in /usr/local/etc/ and not in the /etc/ssh/ as listed in the sshd_config file

14. so, modifid the sshd_config file to reflect the actual location in: /usr/local/etc/ so the entry is:
Hostkey /usr/local/etc/ssh/ssh_host_rsa_key which is of course uncommented. The HostKey entry was uncommencted to look:
HostKey /usr/local/etc/ssh/sshd_host_key

15. stop. started the sshd daemon and got:

could not load host key: /usr/local/etc/ssh/ssh_host_key
could not load host key: /usr/local/etc/ssh/ssh_ost_rsa_key
disabling protocol versiob 2. could not load host key
sshd: no hostkeys available -- exiting

Yes I am confused, thanks for reading & appreciate any help, thanks in advance!




Glad to be here!
 

I have not run that command yet.
Next time I'll stick with RPMS, they seem to do it all for you.
I will check ssh-keygen, although no idea what's recommended there.
Thanks agaiN!

Glad to be here!
 
Well - installed ssh only once, and it's been 2 years ago, but I remember that it's more complicated than other stuff.

I don't know, whether a rpm can get around this, because you have to generate secure keys, and a secure key can't be generated completely automatically (afaik).

I remember, the user has to do some keyboard and/ or mouse-input, to generate the key.

But a quick view showed me, that I need this /etc/ssh/ssh_host_rsa_key, and that it has to be generated with the ssh-keygen.

seeking a job as java-programmer in Berlin:
 
Ok.
find / -name ssh_host_key
returns this location:/usr/local/etc/ssh_host_key
When restarting openssh with /usr/local/openssh-3.8.1p1/sshd
It reports:
could not load host key: /usr/local/etc/ssh/ssh_host_key
Could not load host key: /usr/local/etc/ssh/ssh_host_rsa_key
Disabling protocol version 2. Could not load host key
sshd: no hostkeys available -- exiting

It is looking int /usr/local/etc/ssh/, as pointed when starting sshd, and it is not checking where the "keys" are actually at the moment: /usr/local/etc/, as the find command shows above.

Anyway, I have looked into this so much, it is quite ridiculous.

Another question, when running the ssh-keygen -b, how many bits should be specified? 768? Also, that same command, the -t for type should dsa and rsa??

Never ran the above, thanks!



Glad to be here!
 
ran:
/usr/local/openssh-3.8.1p1/ssh-keygen -b 768 -t rsa
and did the same for dsa, needless to say, it failed!!!
It detected existing keys, said Y to overwrite & it simply failed.

How can it all worked like a magic when another system had everything installed as RPMs?? This is nuts!!!!!!!!!

Thanks to all!

Glad to be here!
 
Another question, when running the ssh-keygen -b, how many bits should be specified? 768
A one-minute look at man ssh-keygen shows: 1024

Perhaps you should look for a rpm-package, which reads the manpages loudly...

'man' is your friend.
spend some time with him...

seeking a job as java-programmer in Berlin:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top