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 ...
- 05-13-2011 #1Just Joined!
- Join Date
- May 2011
- Posts
- 6
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 #2Linux Newbie
- Join Date
- Mar 2010
- Posts
- 121
You probably have a telnet server already running - what happens when you try to telnet into the unit?
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:
Comment-out the line that starts ::sysinit:/bin/sh... and that'll stop the telnet server running at start-up time. Of course, this means you won't be able to telnet in, but I assume you're accessing a terminal through a serial console or some other method?Code:# Start telnet daemon. ::sysinit:/bin/sh -l -c '/usr/sbin/telnetd -l /bin/login'


Reply With Quote
