1

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?

Mikey T.K.
  • 1,112
  • 18
  • 43
  • what architecture is your appliance? x86? Have you tried to run your binary on the appliance? – arved Mar 19 '18 at 16:14
  • @arved : X86. Running the generated binary as is causes a segfault. – Mikey T.K. Mar 19 '18 at 18:08
  • do you have gdb on your device? According to the readme a common problem is pty allocation, have you tried to --disable-openpty ? – arved Mar 19 '18 at 18:27

0 Answers0