Install OpenSSH from source code.

Issues related to applications and software problems
hack3rcon
Posts: 757
Joined: 2014/11/24 11:04:37

Install OpenSSH from source code.

Post by hack3rcon » 2019/01/08 13:09:25

Hello.
I downloaded the last version of OpenSSH and install it by:

Code: Select all

#./configure && make && make install
But when i want to start "sshd" by "systemctl" then it show me below error:

Code: Select all

Failed to start ssh.service: Unit not found
Must I create any link or...?

Thank you.

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Install OpenSSH from source code.

Post by TrevorH » 2019/01/08 14:38:30

Why would you do such a stupid thing?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Mike_Rochefort
Posts: 215
Joined: 2016/03/16 02:34:19

Re: Install OpenSSH from source code.

Post by Mike_Rochefort » 2019/01/08 15:55:03

Is there a specific reason you want/need the latest OpenSSH version? By doing what you just did, if the configure script points to /usr by default you just overwrote the core SSH implementation bundled with CentOS. Not a great way to start off ;)

If you need certain functionality, it’s best to request it on Red Hat’s Bugzilla. Otherwise you’re stepping into very risky grounds.

Cheers,
Mike
Solution Architect @RedHat | RHCE
Former SysAdmin @BlueSkyStudios and @Pixar
Feature animation and VFX enthusiast
--
Report CentOS Stream 8 bugs: https://da.gd/c8s-bugs
Report CentOS Stream 9 bugs: https://da.gd/c9s-bugs

hack3rcon
Posts: 757
Joined: 2014/11/24 11:04:37

Re: Install OpenSSH from source code.

Post by hack3rcon » 2019/01/09 20:07:32

TrevorH wrote:
2019/01/08 14:38:30
Why would you do such a stupid thing?
I don't know why in your opinion it is a stupid think but it is open source and I like to change something and install.

hack3rcon
Posts: 757
Joined: 2014/11/24 11:04:37

Re: Install OpenSSH from source code.

Post by hack3rcon » 2019/01/09 20:08:41

Mike_Rochefort wrote:
2019/01/08 15:55:03
Is there a specific reason you want/need the latest OpenSSH version? By doing what you just did, if the configure script points to /usr by default you just overwrote the core SSH implementation bundled with CentOS. Not a great way to start off ;)

If you need certain functionality, it’s best to request it on Red Hat’s Bugzilla. Otherwise you’re stepping into very risky grounds.

Cheers,
Mike
Why not? The last version solved bugs or...

aaronc
Posts: 3
Joined: 2019/01/09 19:23:17

Re: Install OpenSSH from source code.

Post by aaronc » 2019/01/09 20:25:32

hack3rcon wrote:
2019/01/09 20:08:41
Why not? The last version solved bugs or...
You might not understand how the versions of things work in CentOS then. Let's say you have a program that's version 2.4.6-1 like httpd is out of the box on CentOS. To get newer features you would need to upgrade to 2.4.37. That's fine if you need FEATURES. But if you're just concerned with bug and security fixes, then all those changes are backported for you. So when you update httpd on CentOS you might jump to 2.4.6-8 or something like that.

This is done so you have a stable, secure system.

So what they were pointing out to you is that there are probably few new features in SSH that you actually care about or need. You would have been fine with the default ssh. Only if you ran into an issue where you wen't "Oh I really need that new ssh feature" should you have tried to build from source. If you had a specific feature that you wanted, then sure we might be able to help, otherwise I'd recommend just undoing everything and running

Code: Select all

yum install openssh-server.x86_64

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Install OpenSSH from source code.

Post by TrevorH » 2019/01/09 23:48:01

Plus if you compile and build openssh from source and use make install as root then it's very likely that it will overwrite the CentOS supplied packaged versions of those files. Next time there's an openssh update from CentOS, yum will not know about your source install and will merrily put you back on the version it thinks you should have.

The whole point of running CentOS is that you get security updates and stability. If you go off and randomly build things from source then you are now entirely responsible for keeping it up to date. If you build openssh from source then you need to subscribe to the openssh mailing list to know when new security updates come out so that you can rebuild yours. Or on CentOS you just run yum update and it does it for you without being subscribed to 4 bazillion security mailing lists...
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
toracat
Site Admin
Posts: 7518
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: Install OpenSSH from source code.

Post by toracat » 2019/01/10 00:07:08

CentOS Forum FAQ

Mike_Rochefort
Posts: 215
Joined: 2016/03/16 02:34:19

Re: Install OpenSSH from source code.

Post by Mike_Rochefort » 2019/01/10 05:18:53

On top of what’s been said here by the others, a lot of these system packages are inter-dependent on one another. For example, if you build Python 3.x from source and installed it to /usr (not /usr/local) and gave it the symlink/name ‘python’, yum would completely break, as it’s Python 2 dependent. If there is a package that depends on the specific version of OpenSSH supplied by Red Hat, manually overwriting SSH could break that application/library. It’s best to install user built libraries to /usr/local (which I don’t recommend if you’re choosing to build a library that is supplied in repos due to name conflicts and LD_LIBRARY_PATH) or in a custom location and specifically mention paths or build/use a module system for ease of life.

If features don’t matter to you and you find a bug, please report it on Bugzilla. Someone at Red Hat will see it. If you know how to fix it, you can also download the source RPM, change the release number in the spec file, and create a patch to apply, and generate an RPM. You are much less likely to break system packages this way.

Cheers,
Mike
Solution Architect @RedHat | RHCE
Former SysAdmin @BlueSkyStudios and @Pixar
Feature animation and VFX enthusiast
--
Report CentOS Stream 8 bugs: https://da.gd/c8s-bugs
Report CentOS Stream 9 bugs: https://da.gd/c9s-bugs

hack3rcon
Posts: 757
Joined: 2014/11/24 11:04:37

Re: Install OpenSSH from source code.

Post by hack3rcon » 2019/01/10 20:26:04

I changed some parts of OpenSSH and want to install it.

Post Reply