Configure telnetd in busybox

Source: Internet
Author: User

When configuring telnetd in busybox, go to the busybox source code directory, select Telnet and telnetd. Then make sure that inetd and in. telnetd or telned exist in the sbin directory of ramdisk. In the MNT/etc directory of ramdisk, ensure that the files fstab, service, and inetd exist. conf and passwd files Ensure that the fstab file contains the line NONE/dev/PTS devpts mode = 0622 0 0 to ensure that the line Telnet 23/tcp exists in the services file to Ensure inetd. telnet stream tcp Nowait root/sbin/In exists in Conf. telnetd in. telnetd ensures that the passwd file contains root: 0: 0: Root: // bin/sh, indicating that the root account without a password is in the kernal Code, through makemenuconfig, in character devices, select unix98 Pty support, select/dev/PTS File System for unix98 ptys in file systems, and then make Zima GE to start the file MNT/etc/init in ramdisk. in D/RCs, add inetd to the next line after Mount-a so that the system will load the Telnetd Server to create the inetd when it starts. CONF file with the following content: # telnetstream TCP Nowait root/usr/sbin/telnetd run inetd. conf has been Google for one day on the Internet, and you can finally determine to use telnetd. The kernel must be configured with the following items: DEV/PTS File System for unix98 ptys unix98 Pty support (256) maximum number of unix98 ptys in use (0-2048) can be used in the 2.6.14.1 kernel. Make menuconfig cannot find these configuration items! Does the Kernel support these options? CAT/proc/filesystems found that devpts file systems are supported. What about uinx98 Pty? Check the kconfig and makefile files of the kernel and find that as long as config_unix98_ptys = Y, the system will compile and support the devpts file system and unix98 functions. If the embedded CPU kernel is selected, config_unix98_ptys = y is used by default. Therefore, my kernel supports Telnet. The fstab file also contains the devpts File System: devpts/dev/PTS devpts defaults 00 inittab file, which also specifies the Telnet action: tty0: askfirst: -/bin/sh: Why not? Confused! Later, I thought it was a problem with the file node of the device. I have never used devfs when porting the 2.6 kernel and driver on the Development Board. Although devfs is convenient, it also prevents the understanding of the file node of the device and the 2.6 kernel has abandoned devfs. What file nodes should be created using telnet? Devpts will automatically create nodes under/dev/pts. What else? Google has no answer after a while. Later, I suddenly remembered some instructions in the kconfig file, and then I took a look. It turned out that a Pseudo Terminal (Pty) is a software device consisting of two halves: a master and a slave. the slave device behaves identical to a physical terminal; the master device is used by a process to read data from and write data to the slave, thereby emulating a terminal. typical programs for the master side are Telnet servers and xterms. linux has traditionally used t He BSD-like names/dev/ptyxx for masters and/dev/ttyxx for slaves of pseudo terminals. this scheme has a number of problems. the gnu c library glibc 2.1 and later, however, supports the unix98 Naming Standard: in order to acquire a Pseudo Terminal, a process opens/dev/ptmx; the number of the Pseudo Terminal is then made available to the process and the Pseudo Terminal slave can be accessed as/d EV/pts/. What was traditionally/dev/ttyp2 will then be/dev/pts/2, for example. It is because the ptmx device file is missing! Check the documentation/devices.txt file. Mknod-M 666 ptmx C 5 2 try again, OK you can telnet the development board! I am using the telnetd of busybox directly. busybox supports using inetd to manage telnetd. If you are interested, try it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.