Thursday, August 27, 2009

Running Telnet daemon on LN2410

The Telnet protocol is one of the simplest ways to log into a remote network host. Consequently, it’s the easiest way to access your target system once it is connected to a network. To enable remote login, your target must run a Telnet daemon. There are two main Telnet daemons available for use in embedded Linux systems: telnetd, which is part of the netkit packages mentioned earlier, and utelnetd, which is maintained by Robert Schwebel of Pengutronix.

The utelnetd package provides a small and efficient stand alone
telnet server daemon. The utelnetd package is small and compact, and
uses less resources than a traditional telnet server daemon, making
it ideal for use on embedded systems, or systems where memory is
limited.

Download utelnet from the link below

http://www.filewatcher.com/m/utelnetd­0.1.6.tar.gz.13869.0.0.html
Extract the Source file from the tarball.
tar ­-zxvf utelnetd­0.1.6.tar.gz

Change the cc option to the cross compiler in the Makefile.
CC = arm­-linux­-gcc
Now compile the file using the make command.

Copy the binaries(utelnetd) to root file system's /bin folder
Now boot the kernel and filesystem up.
Now run the utelnetd server on the board,you can access the board
using the telnet IP Address command from the host PC.


Note:

The Telnet daemon uses pseudoterminal devices, called pty for short,
to provide a terminal for the shell and other programs to run in,
when invoked from the network via this daemon. One of the most common
pitfalls for novice embedded Linux system builders regarding the
Telnet service is to neglect some configuration detail related to
ptys that prevents users from logging in to the system via Telnet.
If the Telnet daemon is running and networking is otherwise working
(you can, for example, ping other hosts), make sure of the following:

The /dev/ptmx exists and that it is a character device file with a
major number of 5 and a minor of 2; if not, create it using the
command:
$ mknod /dev/ptmx c 5 2
• Support for the devpts pseudofilesystem is enabled in the kernel by
looking for the devpts entry in the /proc/filesystems file, or add
the support by turning on the
CONFIG_UNIX98_PTYS Linux kernel build option.
• The /dev/pts directory exists and that the devpts pseudofilesystem
is mounted on it correctly, either by issuing the mount command and
looking for the devpts entry or mounting it using the command:
$ mkdir /dev/pts && mount ­t devpts none /dev/pts

1 comment:

  1. I have successfully cross compiled and copied utelnetd and copied image to /bin of target board


    telnet 192.168.5.55

    Trying 192.168.5.55...
    Connected to 192.168.5.55.
    Escape character is '^]'.
    GCS login: root
    Password:
    Login incorrect
    Board login: -su
    Password:
    Login incorrect
    Board login: root
    Password:
    Login incorrect
    Connection closed by foreign host.


    any help I am unable login
    there is no password for my root
    thanks in advance

    ReplyDelete