1

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.

userpal
  • 593
  • 3
  • 9
  • 17

1 Answers1

1

I would suggest that you simplify your life tremendously and avoid going down this route any farther and instead see about finding a package for the 6.2 version and either using that directly (if possible) or building a package from the source package for it.

If all else fails you should be able to take the current (5.9) source package and replace the version bits (and possibly patches) and try to build a package from it with the version you want (6.2).

Using a package (yours or someone else's that are built correctly) will avoid the large amounts of pain you will inevitably encounter trying to do this all from source when you aren't comfortable with this stuff.

Etan Reisner
  • 1,353
  • 6
  • 14
  • I would like to try either (1) building a new Ubuntu .deb package from source or (2) take the v5.9 source package and apply v6.2 patches and build a new package from it. Can you give me some links to any tutorial websites? Thanks – userpal Aug 02 '13 at 15:00
  • I'm not overly familiar with building .deb packages but you should be able to take the source for the 5.9 package (or possibly better the 6.1 package from raring), extract it, make whatever changes need to be made and then just rebuild it (with dpkg-buildpackage or something like that). I expect Ubuntu might have some documentation up about how to build packages (and I know debian has some somewhere also). – Etan Reisner Aug 02 '13 at 15:29