Results 1 to 2 of 2
Hi Arrowheart (or anyone else!) I'm new to Linux (and this forum) and am trying to implemnent something that I am sure is really simple - but only if you ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-13-2011 #1
- Join Date
- May 2011
Using STDIN for telnet
Hi Arrowheart (or anyone else!)
I'm new to Linux (and this forum) and am trying to implemnent something that I am sure is really simple - but only if you know how!
I am developing a Digi embedded module, writing in C on a linux OS and simply want to be able to read in and write out characters from the standard telnet port (23) when a client connects.
Currently I have found some code that allows me to do this using port 3490 but if I change this to port 23 I just get an error that the address is already in use (I assume from STDIN).
I have been told the easieast way to accomplish what I want is by using STDIN and STDOUT, but I have no idea where to start. It seems your snippit of code may be going in that direction.
Any help greatly appreciated! Thanks.
- 05-13-2011 #2
- Join Date
- Mar 2010
If your Digi module is anything like the ones I work on, you probably have a line that looks something like this in /etc/inittab on your module:
# Start telnet daemon. ::sysinit:/bin/sh -l -c '/usr/sbin/telnetd -l /bin/login'