Start telnetd server
1. linux kernel config
check *File systems --> /dev/pts file system for Unix98 PTYs
check *Character devices -> Unix98 PTY support
2. busybox config
check *General Configuration -> Support for devfs
check *General Configuration -> Use the devpts filesystem for Unix98 PTYs
3. check /dev/ptmx
mknod -m 666 ptmx c 5 2
4. add telnet for root logins
add the following to the end of the file:0~7 表示可以有 8 個連線。
pts/0
pts/1
pts/2
pts/3
pts/4
pts/5
pts/6
pts/7
可以利用下面的 script 建立。
for i in 0 1 2 3 4 5 6 7
do
# /bin/mknod /dev/ttyp$i c 3 $i
# /bin/mknod /dev/ptyp$i c 2 $i
/bin/mknod /dev/pts/$i c 136 $i
done
5. run telnetd
/# telnetd
PS:
busybox config -> Login/Password Management Utilities -> Support for shadow passwords
不用選,還可以省點 size,並且把 /etc/shadow 移除,因為用不到。
另外在 passwd 及 shadow 的密碼都是要加密的,而非 passwd 內的密碼是明碼。
PS:
cat /etc/passwd
root::0:0:root:/bin:/bin/sh
bin::1:1:bin:/bin:/bin/sh
guest::6:6:guest:/bin:/bin/sh
nobody::99:99:nobody:/bin:bin/sh
check *File systems --> /dev/pts file system for Unix98 PTYs
check *Character devices -> Unix98 PTY support
2. busybox config
check *General Configuration -> Support for devfs
check *General Configuration -> Use the devpts filesystem for Unix98 PTYs
3. check /dev/ptmx
mknod -m 666 ptmx c 5 2
4. add telnet for root logins
add the following to the end of the file:0~7 表示可以有 8 個連線。
pts/0
pts/1
pts/2
pts/3
pts/4
pts/5
pts/6
pts/7
可以利用下面的 script 建立。
for i in 0 1 2 3 4 5 6 7
do
# /bin/mknod /dev/ttyp$i c 3 $i
# /bin/mknod /dev/ptyp$i c 2 $i
/bin/mknod /dev/pts/$i c 136 $i
done
5. run telnetd
/# telnetd
PS:
busybox config -> Login/Password Management Utilities -> Support for shadow passwords
不用選,還可以省點 size,並且把 /etc/shadow 移除,因為用不到。
另外在 passwd 及 shadow 的密碼都是要加密的,而非 passwd 內的密碼是明碼。
PS:
cat /etc/passwd
root::0:0:root:/bin:/bin/sh
bin::1:1:bin:/bin:/bin/sh
guest::6:6:guest:/bin:/bin/sh
nobody::99:99:nobody:/bin:bin/sh
回覆刪除Quick up for the best offer of AWS DevOps Training in Chennai from Infycle Technologies, Excellent software training in Chennai. A massive place to learn other technical courses like Power BI, Cyber Security, Graphic Design and Animation, Block Security, Java, Oracle, Python, Big data, Azure, Python, Manual and Automation Testing, DevOps, Medical Coding etc., with outstanding training with experienced trainers with a fresh environment with 100+ Live Practical Sessions and Real-Time scenario after the finalisation of the course the trainee will able to get through the interview in top MNC’s with an amazing package for more enquiry approach us on 7504633633, 7502633633.