Taiga Developer Site

Japanese
topmenu webgame software download developer  
 

Top > Developer > Let's Hacking Linux Zaurus

telnetサーバを動かす

ザウルスの中身を色々覗く時に実機上でチマチマやるのはかったるいので、telnetでリモートからログインできるようにしてみます。telnetサーバを動かすためのプログラムは標準で含まれているので、設定を変更するだけで動作します。

/etc/inetd.confの編集

/etc/inetd.confを編集してinetdを再起動すれば使用できるようになります。
/etc/inetd.confに以下のような記述があります。#はコメント行です。

/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

With tcpdとWithout tcpd の二つの設定がありますが、このどちらかのコメントをはずせばOKです。 With tcpdの場合は以下のようになります。 With tcpd経由のほうがセキュリティ上は好ましいと思いますが、まぁとっちでもいいでしょう。

/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

inetdの再起動

inetdはまだこの設定の変化を知らないので、再起動させて設定を有効にする必要があります。
ターミナル上でスーパーユーザになって以下のコマンドを実行します。

su
killall -HUP inetd

PCとの接続

ザウルスのIPアドレスは初期設定では192.168.129.201です。PCとUSB接続した状態で/sbin/ifconfigを実行すれば確認できます。

/sbin/ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:24 errors:0 dropped:0 overruns:0 frame:0
TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2024 (1.9 Kb) TX bytes:2024 (1.9 Kb)

usbd0 Link encap:Ethernet HWaddr 40:00:01:00:00:01
inet addr:192.168.129.201 Bcast:192.168.129.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1886 errors:0 dropped:0 overruns:0 frame:0
TX packets:1317 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:212230 (207.2 Kb) TX bytes:161254 (157.4 Kb)