zoukankan      html  css  js  c++  java
  • 配置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:

  • 相关阅读:
    QML vs WEB
    《TO C产品经理进阶》
    《TO B产品设计标准化》
    《多元思维模型》跨学科及其核心思维模型
    产品经理审美训练
    Aria2多线程轻量级批量下载利器
    正则表达式
    如何开发一个用户脚本系列教程
    Aria2自动下载
    助贷
  • 原文地址:https://www.cnblogs.com/cute/p/2025156.html
Copyright © 2011-2022 走看看