telnetできるようにした

ずっとSSHで入りたいと思っていたが、
何となく面倒で、、でもtelnetで入らないと
不便で、、というわけで、ささっと設定してみた。
簡単簡単。


1.まず、/etc/inetd.confの書き換え。
真ん中らへんで

### With tcpd (TCP Wrapper) ###
#ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd -l -a
#telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd
### Without tcpd (TCP Wrapper) ###
#ftp stream tcp nowait root /usr/sbin/in.ftpd -l -a
#telnet stream tcp nowait root /usr/sbin/in.telnetd

こうなっているので、このtelnetの#をはずす。
tcpserverを使いたいのなら、with tcpdを、
使わないのならwithout tcpdを。


私は、terminalからviでいじった。
しかしこのterminalの使い方がよくわかっておらず、
とりあえずShift+qでコマンド打てた。
(ふつーRedhatでEsc押すところを、そんな感じで。)


あと最初、inetd.confはReadONLYになっているので

# su -      rootになって
# chmod u+w inetd.conf  usrに書き込み権限を与える

そしてちゃんと最後は

# chmod u-w inetd.conf  usrから書き込み権限をはずす

のを忘れずに。


2.inetdを再起動して、再起動できたかどうか確認

# killall -HUP inetd inetdを再起動
# ps -ef | grep inetd   inetdが再起動したかどうか

grepかけると、こんなのが出てくる。
コレが出てきたら、ちゃんと動いています。

root 154 1 0 02:23 ? 00:00:00 /usr/sbin/inetd


3.rootユーザーの設定
/etc/securettyにエントリを追加

# for num in 0 1 2 3 4 5 6 7; do echo "ttya$num" >> /etc/securetty; done


4.telnetでつないでみる。
私はざうはbitWarpなので、とりあえずネット接続して
ifconfigでIPを調べ、WinのTeraTermでつないでみた。


うまくいきましたっ!
ちょと動作のろいので、そのへんは色々研究してみる予定。
そしてtcpserverも入れたい。SSHにもしたいなぁ。


あ、追記だが、SL-860にtelnetdが元々入っているのか
わからず、rpm -q telnetdとか打ったんだけど
rpmがcommand not found・・・
何を使えばいいんだ・・・orz
uname打つと、Linux
私が普段使っているのは、Redhatだからなぁ・・orz


参考URL
http://nyamo.net/wiki/wiki.cgi?LinuxZaurus#i9
http://www.asahi-net.or.jp/~qn6o-mrtm/lizaurus/server/telnet.htm
http://www.areanine.gr.jp/~nyano/telnet.html