Background
I'm trying to restore an old DNS/DHCP appliance machine. It's from around 2009 and runs what appears to be a customized Linux 2.6 kernel.
The copy of OpenSSH installed on the appliance appears to have been modified to only allow a proprietary, restricted shell to run. Bash is available, but my usual workarounds of trying to run a command directly with ssh
or setting up a subsystem that gives me a shell have been unsuccessful - the daemon just closes the connection.
Therefore: I need to come up with a replacement SSHD. This is a very memory-constrained machine, so something simple like Dropbear would be the way to go.
Upgrading the machine is not an option at this point.
The problem
I have no idea what I need in order to compile Dropbear against Linux 2.6. I've gotten a copy of the Linux sources and a period-accurate Dropbear release, and gotten it to compile as a static binary on X86 (not 64 bit), and messing around with the make
command's includes to point at those sources, but file
always tells me that the resulting binary is "For Linux 3.2" anyways.
I've got little C experience beyond following instructions.
What am I missing here, and what is the magic invocation to force make
to use the Linux 2.6 sources instead of my work system's sources?