• 配置uClinux里的busybox中telnetd服务


    启动 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:

  • 相关阅读:
    Game Engine Architecture 3
    Game Engine Architecture 2
    补码
    工厂模式
    Game Engine Architecture 1
    YDWE Keynote
    3D Math Keynote 4
    3D Math Keynote 3
    3D Math Keynote 2
    OGRE中Any 类型的实现
  • 原文地址:https://www.cnblogs.com/cute/p/2025156.html
Copyright © 2020-2023  润新知