busybox配置telnetd
busybox配置telnetd的问题 进入busybox源码文件夹,选择telnet,telnetd.后确保在ramdisk的sbin文件夹下存在inetd和in.telnetd或telned。在ramdisk中的mnt/etc文件夹中,确保存在文件fstab,service,inetd.conf,passwd文件确保fstab文件里存在none /dev/pts devpts mode=0622 0 0这一行确保services文件里存在 telnet 23/tcp 这一行确保inetd.conf中存在 telnet stream tcp nowait root /sbin/in.telnetd in.telnetd 确保passwd文件里存在root::0:0:root:/:/bin/sh,表示没有password的root帐号在kernal的代码中,通过makemenuconfig,在Character devices中选中Unix98 PTY support 在File systems中选中/dev/pts file system for Unix98 PTYs 退出后make zImage就可以在ramdisk的启动文件mnt/etc/init.d/rcS中,在mount –a的后面下一行添�inetd,使系统启动的时候就载入telnetd服新建inetd.conf文件,内容例如以下: # telnetstream tcp nowait root /usr/sbin/telnetd 执行inetd inetd.conf 在网上google了一天,终于能够确定要使用telnetd,内核必须配置下面项: dev/pts file system for Unix98 PTYs Unix98 PTY support (256) Maximum number of Unix98 PTYs in use (0-2048) 可我使用的2.6.14.1的内核,make menuconfig根本找不到这些配置项!那么内核是否支持这些选项呢?cat /proc/filesystems发现已支持devpts文件系统,那么uinx98 pty呢?查看内核的Kconfig和Makefile文件,发现仅仅要CONFIG_UNIX98_PTYS=y就会编译支持devpts文件系统和unix98的功能。而选择了嵌入式CPU内核会默认CONFIG_UNIX98_PTYS=y。所以我的内核已经支持telnet。 fstab文件里也载入了devpts文件系统: devpts /dev/pts devpts defaults 00 inittab文件里也指明了telnet的动作: tty0::askfirst:-/bin/sh 为什么还不行呢?困惑!后来细致想想,应该是设备文件节点的问题。我在开发板上移植2.6内核和驱动时一直没有使用devfs。由于devfs尽管方便,但同一时候也阻止了对设备文件节点的了解,且2.6内核已放弃了devfs。那么使用telnet应该创建那些文件节点呢?devpts会在/dev/pts下自己主动创建节点,还有什么呢?google了一会没有答案。后来忽然想起Kconfig文件里好象些说明,再去看一看,原来是这样: 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 the 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 /dev/pts/. What was traditionally /dev/ttyp2 will then be /dev/pts/2, for example. 是由于缺少ptmx设备文件!查看Documentation/devices.txt文件,好了。 mknod -m 666 ptmx c 5 2 再试试,OK能够telnet开发板了!我是直接使用的busybox的telnetd,busybox支持用inetd管理telnetd,有兴趣的朋友能够试
busybox配置telnetd的更多相关文章
- BusyBox telnetd配置
配置telnetd遇到的一些坑,记录一下 BusyBox版本1.22.1 Networking Utilities -->[*] telnetd 错误1: Escape character is ...
- BusyBox telnet配置
1. busybox配置telnet相关命令. 2. devpts文件系统,是目前最常见的pseudo终端,使用telnetd服务器,必须加载该文件系统. 在/dev目录下创建一个pts目录,用来 ...
- 使用BusyBox制作根文件系统【转】
本文转载自:http://www.cnblogs.com/lidabo/p/5300180.html 1.BusyBox简介 BusyBox 是很多标准 Linux 工具的一个单个可执行实现.Busy ...
- 编译busybox错误
为了制作一个文件系统,首先要用busybox编译出文件系统所需要的应用程序.在下载了busybox-1.13.0.tar.bz2后,编译出现如下错误: In file included from /o ...
- 【课程分享】深入浅出嵌入式linux系统移植开发 (环境搭建、uboot的移植、嵌入式内核的配置与编译)
深入浅出嵌入式linux系统移植开发 (环境搭建.uboot的移植.嵌入式内核的配置与编译) 亲爱的网友,我这里有套课程想和大家分享,假设对这个课程有兴趣的,能够加我的QQ2059055336和我联系 ...
- 【Linux技术】BusyBox详解
BusyBox 是很多标准 Linux® 工具的一个单个可执行实现.BusyBox 包含了一些简单的工具,例如 cat 和 echo,还包含了一些更大.更复杂的工具,例如 grep.find.moun ...
- BusyBox 简化嵌入式 Linux 系统
BusyBox 是很多标准 Linux® 工具的一个单个可执行实现.BusyBox 包含了一些简单的工具,例如 cat 和 echo,还包含了一些更大.更复杂的工具,例如 grep.find.moun ...
- 使用BusyBox制作根文件系统
1.BusyBox简介 BusyBox 是很多标准 Linux 工具的一个单个可执行实现.BusyBox 包含了一些简单的工具,例如 cat 和 echo,还包含了一些更大.更复杂的工具,例如 gre ...
- 根文件系统及Busybox简介
转:http://blog.csdn.net/wqc02/article/details/8930184 1.根文件系统简介...2 2.Busybox简介...2 2.1Busybox简介...2 ...
随机推荐
- MySQL_PHP学习笔记_2015_0923_MySQL如何开启事件
1. 查看事件状态>>>>>>>>>>>>>>>>>>>>>>> ...
- 用代码将Excel数据导入Sql Server
这里直接用小例子说明. 1.打开VS2010—>文件—>新建—>网站,选择ASP.NET空网站并设置存放路径以创建空网站.(我这里路径设置为D:\excelEduceToSql) 2 ...
- 传统IT大佬们,路在何方?
[文/ 任英杰] 2014年第一季度季报陆续出台,互联网公司无疑仍是璀璨明星,一路凯歌,而与互联网企业的蒸蒸日上形成鲜明对照的是传统IT企业的集体黯然失色.分析一下传统IT大佬们发布的数据,用友营业收 ...
- 在logopond中看到的优秀设计随想
本随笔仅仅只是自己对于设计作品的想法,不喜勿喷~ 昨日看到关于大神配色的文章,决定在logopond网站中看看优秀的作品,以为自己的配色找找灵感,学习学习,对自己有很强的震撼力的有: 以女性高跟性的抽 ...
- ubuntu下Qt cannot find -lGL错误的解决方法 (转载)
在ubuntu下使用Qt 编译时候遇上了cannot find -lGL错误,使用命令 sudo apt-get install libqt4-dev或者sudo apt-get install li ...
- html5 canvas图片翻转
<!doctype html> <html> <head> <meta charset="utf-8"> <title> ...
- Javascript事件处理进阶
这篇文章是我在看乌龟书<编写可维护的Javascript>发现的一篇写的非常好的章节,在这里我并不会教大家什么是绑定事件等比较基础的事.有兴趣了解DOM事件的同学们,可以去w3cschoo ...
- Network Object NAT配置介绍
1.Dynamic NAT(动态NAT,动态一对一) 实例一: 传统配置方法: nat (Inside) 1 10.1.1.0 255.255.255.0 global (Outside) 1 202 ...
- javascript日期格式化方法汇总
本文给大家汇总介绍了javascript格式化日期时间的几种常用方法,个人对最后一种个性化输出时间比较有兴趣,基本上只要项目中能用到都是使用这种,推荐给小伙伴们. 方法一: ? 1 2 3 4 5 6 ...
- Umbraco部署到IIS中权限问题(back office没有权限新建template)
在开发项目中,发现把基于Umbraco平台开发的网站部署到服务器的IIS之后,访问该网站的back office 在back office中增加一个template时,发送错误,提示 Access t ...