Tuesday, February 28, 2023

[Solved] Re: How to produce statically linked sshd binary

Thanks everyone,

After some friendly advice off-list I was able to solve the problem. It
was very simple really.
However, since it is dubious practice at best, and runs contrary to the
OpenBSD project goals, it feels wrong to share the "solution" here.
Anyone interested may contact me off-list.

Best Regards,

Erling

On Tue, Feb 28, 2023 at 04:42:53AM +0100, Erling Westenvik wrote:
> Hi!
> In the past, at least into several 6.x releases, I was able to produce a
> statically linked sshd(8) binary like this:
>
> # cd /usr/src/usr.bin/ssh
> # make clean
> # make LDSTATIC=-static lib sshd
> # strip /usr/src/usr.bin/ssh/sshd/sshd
>
> On a fresh 7.2 install however, the above won't do anymore.
>
> (It stops dead complaining about the "lib"-part in LDSTATIC=. When
> trying without "lib" it goes on for a while but ends with complaints
> about malloc-something. As you probabley understand by now, I'm not
> exactly a wizard.. : )
>
> Anyone up for outlining a simple "how-to"?
>
> Kind regards,
>
> Erling

No comments:

Post a Comment