Telnet Inclusion?

Posted by: suomi35

Telnet Inclusion? - 18/03/2002 17:12

How hard would it be to include telnet in hijack? Since we've already got inetd going with http and ftp why not add telnet in there as well? This topic seems to have faded a bit lately so I thought I'd blow the dust off it.
Posted by: mlord

Re: Telnet Inclusion? - 18/03/2002 20:11

Well, inetd is something completely different (not in Hijack), but also not really needed here for anything. (inetd is a super-daemon which binds to a lot of ports, and then spawns other daemons to handle incoming connections on those ports).

But telnetd is possible, though I don't see a compelling reason for it to be part of the Hijack kernel -- a userland telnetd app would be about the same size, and easier to play with once installed I suspect.

I once (like, a month ago) found some source code for a 100-line (C) telnetd from the 1980s -- no libraries or other package dependencies to speak of. Nice, compact, simple code. I even fiddled with maybe dropping it into Hijack at the time, but the syscalls work differently within the kernel and it was not to be.. but in userland, it should just drop in place and work. Lost the source though, and cannot for the life o'me remember where I found it.

But just go hunting with Google, for telnetd from say.. BSD 2.0 or something, and it'll be there. More recent versions are bloated with localization and extra security (eg. kerberos) and crap.. the older ones are nice lightweight simple code.

Cheers
Posted by: suomi35

Re: Telnet Inclusion? - 18/03/2002 22:55

Cool! For some reason I thought that telnetd should need to be called along with httpd and ftpd...a userland telnet app would be fantastic, however. Thanks for clearing that up and keep up the good work!
Posted by: smu

Re: Telnet Inclusion? - 19/03/2002 05:09

Hi.

I just found a telnetd source from 1989 at http://web.mit.edu/afs/athena.mit.edu/astaff/reference/4.3network/telnetd/

I will have a look at it as soon as I can (but probably not within the next fortnight, so if anyown has the time and knowledge to patch/compile it for the empeg, please do so.

Edit: We would also have to port /bin/login, which is also available in that web archive (just replace /telnetd with /login) in the above URL

cu,
sven
Posted by: mlord

Re: Telnet Inclusion? - 19/03/2002 06:45

Mmm.. a starting point for sure, but much larger than the one I had before, which "lacked" all of the "terminal" settings and stuff.

Cheers
Posted by: foxtrot_xray

Re: Telnet Inclusion? - 19/03/2002 16:50

That's actually the one I found (after your e-mail to me, Mark. BTW, I found your name while looking at 'hdparm' on my linux box. You're everywhere, man.)

I know next to nuthin' when it comes to C - I know enough to be able to get a basic understanding of what's going on, and I'm currently looking at the code and figuring out how to compile it for the ARM..

Hey, I'm learnin'.
Posted by: NiCKEL

Re: Telnet Inclusion? - 19/03/2002 17:49

Did anyone look at this thread:
http://empeg.comms.net/php/showflat.php?Cat=&Board=empeg_tech&Number=77116&page=&view=&sb=&o=&vc=1

Apparently they have a telnet server working. Source was posted.

I havn't had a chance to try it myself yet.

-Geoff
Posted by: jane

Re: Telnet Inclusion? - 20/03/2002 01:30

Writing a simplistic telnet server is really easy. I did this in Minix ages ago.... on an Atari computer.

1) Open and listen to a socket
2) when connected, use a PTY and exec a shell with
the appropritate stdin/out connected / piped to the network socket.

Marius (Escort Cab + Mark II)
Posted by: foxtrot_xray

Re: Telnet Inclusion? - 20/03/2002 10:30

..Yes. And personally, I don't know a THING about Debian. They say there's alot of unresolved links, where you have to go find the librarys and such. It'd be much easier (IMHO, again I could be wrong, I barly know much when it comes to C) to just compile this small telnetd program, have it run as a daemon, and put the little 'login' program in /sbin. All good!