现在的位置: 首页 > 综合 > 正文

配置uClinux里的busybox中telnetd服务

2012年11月24日 ⁄ 综合 ⁄ 共 1163字 ⁄ 字号 评论关闭

启动 telnetd 服务一般有两种方式:

  • 通过inetd服务托管启动
  • 独立启动

通过inetd托管好像需要配置的文件比较多,所以这里选择独立启动方式。
1、 检查kernel配置,需选中"Device Drivers -> Character devices -> Unix98 PTY support"
2、 重新编译uClinux-dist里的busybox,需选中以下几项:

  • BusyBox -> Busybox Settings -> General Configuration  -> Use the devpts filesystem for Unix98 PTYs
  • BusyBox -> Login/Password Management Utilities -> login
  • BusyBox -> Networking Utilities -> telnetd
  • BusyBox -> Networking Utilities -> Support standalone telnetd (not inetd only)
  • 如果使用的是nommu板子(arm7),需要将"BusyBox -> Busybox Settings -> General Configuration  -> Path to BusyBox executable"选项的值设定为“/bin/busybox”

3、 添加group 和 passwd文件到romfs下的etc目录

  1. $ cat romfs/etc/group
  2. root::0:root
  3. $ cat romfs/etc/passwd
  4. root::0:0:root:/:/bin/sh

复制代码

4、 创建设备节点和目录

  1. $ cd romfs/dev/
  2. $ touch @ptmx,c,5,2
  3. $ mkdir pts

复制代码

5、 修改romfs/etc/rc,添加如下内容:

  1. mount -t devpts devpts /dev/pts

复制代码

6、 重新制作romfs.img,进入系统后通过命令:

  1. # telnetd

复制代码

启动telnetd服务。
启动时无需添加“&”, 因为它本身就是一个守护进程。
NOTE:

抱歉!评论已关闭.