Debian release a very interesting telnet version with ssl, is possible to use telnet as an alternative to reach the router in case sshd crash or for some other reason don't work, as emergency. I have tried to compile it using Debian sources and patches.
-- The C compiler identification is GNU 14.2.0
-- The CXX compiler identification is unknown
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
"/usr/bin/cc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: '/root/telnetd-ssl/netkit-telnet-0.17/CMakeFiles/CMakeScratch/TryCompile-pNkecK'
Run Build Command(s): /usr/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_4578f/fast
/usr/bin/gmake -f CMakeFiles/cmTC_4578f.dir/build.make CMakeFiles/cmTC_4578f.dir/build
gmake[1]: Entering directory '/root/telnetd-ssl/netkit-telnet-0.17/CMakeFiles/CMakeScratch/TryCompile-pNkecK'
Building C object CMakeFiles/cmTC_4578f.dir/testCCompiler.c.o
/usr/bin/cc -o CMakeFiles/cmTC_4578f.dir/testCCompiler.c.o -c /root/telnetd-ssl/netkit-telnet-0.17/CMakeFiles/CMakeScratch/TryCompile-pNkecK/testCCompiler.c
Linking C executable cmTC_4578f
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_4578f.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_4578f.dir/testCCompiler.c.o -o cmTC_4578f
/usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find Scrt1.o: No such file or directory
/usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find crti.o: No such file or directory
/usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lssp_nonshared: No such file or directory
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_4578f.dir/build.make:102: cmTC_4578f] Error 1
gmake[1]: Leaving directory '/root/telnetd-ssl/netkit-telnet-0.17/CMakeFiles/CMakeScratch/TryCompile-pNkecK'
gmake: *** [Makefile:133: cmTC_4578f/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
CMake Error at CMakeLists.txt:2 (project):
No CMAKE_CXX_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
Seems the two functions are not defined anywhere on AlpineLinux
/* Write the utmp entry to say the user on UT_LINE has logged out. */
extern int logout (const char *__ut_line) __THROW;
/* Append to wtmp an entry for the current time and the given info. */
extern void logwtmp (const char *__ut_line, const char *__ut_name,
const char *__ut_host) __THROW;
tryng to insert in on header file make only a lot of errors
Trying 192.168.201.199...
Connected to 192.168.201.199.
Escape character is '^]'.
[SSL - attempting to switch on SSL]
[SSL - handshake starting]
[SSL - OK]
Linux 6.12.15-0-lts (alpine1.rosso.priv) (1)
alpine1 login: myuser
Password:
Welcome to Alpine!
The Alpine Wiki contains a large amount of how-to guides and general
information about administrating Alpine systems.
See <https://wiki.alpinelinux.org/>.
You can setup the system with the command: setup-alpine
You may change this message by editing /etc/motd.
alpine1:~$
So the solution was to remove the function undefined on this system and all references to it
The software works fine, but when you close the session it freeze after logout (a workaround is escape+exit)