busybox中telnet功能的添加
来源:互联网 发布:react native vue.js 编辑:程序博客网 时间:2024/05/16 04:55
http://www.embedu.org/Column/Column239.htm
使用busybox制作的一个基本根文件系统如何添加telnetd服务呢?
下面把本人的添加过程列出来供大家分享,如有不同意见请不吝赐教!
1、 添加telnet的支持(busybox中配置)
Networking Utilities --->
[*] telnet
[*] Pass TERM type to remote host
[*] Pass USER type to remote host
[*] telnetd
[*] Support standalone telnetd (not inetd only)
2、 添加mdev的支持(busybox中配置)
Linux System Utilities --->
[*] mdev
3、 添加login(busybox中配置)
Login/Password Management Utilities --->
[*] login
4、 修改etc/init.d/rcS添加mdev内容
#!/bin/sh
mount -a
mkdir /dev/pts
mount -t devpts devpts /dev/pts
echo /sbin/mdev>/proc/sys/kernel/hotplug
mdev -s
/bin/hostname -F /etc/hostname
5、 创建etc/hostnam,并添加主机名
farsight
6、 在etc下创建文件passwd,group,shadow,创建目录/home
7、 修改etc/fstab为
#device mount-point type options dump fsck order
proc /proc proc defaults 0 0
tmpfs /tmp tmpfs defaults 0 0
sysfs /sys sysfs defaults 0 0
tmpfs /dev tmpfs defaults 0 0
8、 内核中添加相应的支持
UNIX98_PTYS=y
DEVPTS_FS=y
9、 使用adduser添加用户
#adduser linux
10、 添加命令行提示符格式,修改/etc/profile添加如下内容
PS1='[\u@\h \W]\# '
HOSTNAME=`/bin/hostname`
export USER LOGNAME PS1
11、 启动telnet服务,在/etc/profile下添加如下内容
telnetd
这个时候我们就可以同过telnet client登陆我们的板子了。上面这些步骤有些不是必须的,大家可以根据需求选择。
12、 参考文献
A daemon for the TELNET protocol, allowing you to log onto the host running the daemon. Please keep in mind that the TELNET protocol sends passwords in plain text. If you can't afford the space for an SSH daemon and you trust your network, you may say 'y' here. As a more secure alternative, you should seriously consider installing the very small Dropbear SSH daemon instead:
http://matt.ucc.asn.au/dropbear/dropbear.html
Note that for busybox telnetd to work you need several things:
First of all, your kernel needs:
UNIX98_PTYS=y
DEVPTS_FS=y
Next, you need a /dev/pts directory on your root filesystem:
$ ls -ld /dev/pts
drwxr-xr-x 2 root root 0 Sep 23 13:21 /dev/pts/
Next you need the pseudo terminal master multiplexer /dev/ptmx:
$ ls -la /dev/ptmx
crw-rw-rw- 1 root tty 5, 2 Sep 23 13:55 /dev/ptmx
Any /dev/ttyp[0-9]* files you may have can be removed.
Next, you need to mount the devpts filesystem on /dev/pts using:
mount -t devpts devpts /dev/pts
You need to be sure that Busybox has LOGIN and FEATURE_SUID enabled. And finally, you should make certain that Busybox has been installed setuid root:
chown root.root /bin/busybox
chmod 4755 /bin/busybox with all that done, telnetd _should_ work....
http://blog.donews.com/tmsonhust/archive/2009/03/14/1477052.aspx
- busybox中telnet功能的添加
- 【转载】busybox中添加自己的程序
- busybox中移植vsftp和telnet服务
- win7中添加telnet
- ARM-Linux中(BusyBox制作的文件系统)telnet服务器的配置和开启
- 向android中添加busybox
- 向android中添加busybox
- 向busybox中添加命令
- 向busybox中添加命令
- BusyBox 中添加新命令
- busybox的作用和功能
- 开启busybox的dhcp功能
- busybox的添加新命令。
- BusyBox制作的文件系统-telnet服务器的配置和开启
- 嵌入式 busybox自带的tftp、telnet、ftp服务器
- Android系统中添加busybox工具
- Android系统中添加busybox工具
- 添加 busybox
- 关于Application windows are expected to have a root view controller at the end of application launch
- 十进制转十六进制和冒泡排序
- Oracle PL/SQL开发利器-Toad应用总结(一)-PL/SQL Program基本编写、调试
- Stateful Session Bean 在JBoss 6 下临时文件
- common-fileupload上传文件
- busybox中telnet功能的添加
- 对一名电子信息工程专业应届毕业生的建议 .
- 【经典源码】网络安全--远程控制--Gh0st3.6饭客网络sid版
- 并发学习之:不使用内核对象同步的并发队列
- 关于 UIWebView 的说明
- 压力测试问题
- QStackedWidget及QStackedLayout使用方法
- Qt学习——堆栈窗体QStackedWidget类
- 全国青少年信息学奥林匹克竞赛培训---快速排序(随机数法)