LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Openssh: could not load... (https://www.linuxquestions.org/questions/linux-general-1/openssh-could-not-load-185782/)

CarlosSunden 05-25-2004 04:20 PM

Openssh: could not load...
 
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 http://www.securetux.com/docs/Securi...p15sec122.html 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 input, thanks in advance!

Carlos

jschiwal 05-25-2004 05:00 PM

From section 15.1.2 on the same website you quoted:
Now, we must compile and install OpenSSH on the Server: [root@deep ]/openssh-1.2.3#make
[root@deep ]/openssh-1.2.3#make install
[root@deep ]/openssh-1.2.3#make host-key
[root@deep ]/openssh-1.2.3#install -m644 contrib/redhat/sshd.pam /etc/pam.d/sshd

make
command will compile all source files into executable binaries,

make install
will install the binaries and any supporting files into the appropriate locations.

make host-key
command will generate a host key.

install
command will install the PAM support for Red Hat Linux, which is now more functional than the popular packages of commercial ssh-1.2.x.


Did you do the make hostkey step mentioned. I don't know whether you are installing this on redhat or debian. I don't know how debian services are started.

CarlosSunden 05-26-2004 10:51 AM

OK

I did the ./configure, make, make install on opsnssh-3.8.1p1.tar.gz
and use the gunzip, tar -xvf which installs "OpenSSH binaries in /usr/local/bin, configuration files in /usr/local/etc, the server in /usr/local/sbin, etc.”

Think I have followed the right steps on doing this.

Have not done make host-key and the install command.

Was not aware this needed to be done, since I had used an RPM openssh previously in another RHL8 system & encountered not an issue.

It is an RHL8 system.

I will run the make host-key & install in the /usr/local/openssh-3.8.1p1/

Do let me know of any other issues ,thanks so much!

CarlosSunden 05-26-2004 12:01 PM

Running make host-key reports in /usr/local/openssh-3.8.1p1/
/usr/local/etc/ssh_hst_key already exists, skipping
/usr/local/etc/ssh_host_dsa_key already exists, skipping
/usr/local/etc/ssh_hosts_rsa_key already exists, skipping

It appears that /usr/local/etc/ is an "official"path or place for this particular install of Openssh.

Ran "install" in the location for PAM but keeps asking for another argument.

How is it possible to uninstall openssh when it was done with a tar.gz package?

Any suggestions welcome, thanks again!


All times are GMT -5. The time now is 01:28 AM.