How to create a init.d script for openssh-server which was compiled and installed from source using configure + make + make install?

Posted by Patrick L on Server Fault See other posts from Server Fault or by Patrick L
Published on 2013-08-02T13:57:09Z Indexed on 2013/08/02 15:41 UTC
Read the original article Hit count: 284

Filed under:
|
|
|
|

I have installed openssh-server in my Ubuntu PC using apt-get install openssh-server. The version is 5.9.

Now, I would like to compile and install openssh-server version 6.2 from source codes. I have successfully downloaded the source codes, and run the following commands:

./configure make make install

I found that the new version of openssh-server was installed into /usr/local/sbin/. The old version of openssh-server is in /usr/sbin/.

I found that the service script in /etc/init.d/ssh is still pointing to /usr/sbin/. And the old openssh-server (v5.9) is still running.

  1. How can I replace the old openssh-server with the new openssh-server that I have just compiled and installed?
  2. How can I create a init.d script to start and stop the new openssh-server that I've compiled from source manually?
  3. How to start the new openssh-server on boot?
  4. When I install openssh-server using apt-get install, the config files will be installed into /etc/ssh/. If I compile and install it from source, where is the config file?
  5. If I compiled openssh-server from source, but I install openssh-client package using apt-get install, will there be any config files conflict?

Thanks.

© Server Fault or respective owner

Related posts about ssh

Related posts about ubuntu-12.04