2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Tiny Core Linuxにtelnet接続

Last updated at Posted at 2016-07-02

Tiny Core Linux7.1でtelnetサーバーを有効にしてtelnet接続できるようにした時のメモです。

アプリのインストール

telnetサーバーを実現するためのtelnetdinetutils-serversという名前のパッケージに含まれていますのでinetutils-serversをインストールします。コマンドラインでインストールする場合以下のようになります。

$ tce-load -wi inetutils-servers

inetd.confの編集

inetutils-serversをインストールすればすぐに使える事を期待したのですが、どうもそうではなさそうですので手動で設定します。まずはinetd.confファイルを作成します。

$ sudo mkdir /usr/local/etc
$ sudo vi /usr/local/etc/inetd.conf
inetd.conf
telnet stream tcp4 nowait root /usr/local/sbin/telnetd telnetd

inetdを起動しtelnet接続できる事を確認します。ユーザ名はtcでパスワードなしでログインできます。実際に使用するには注意が必要かなと思います。

$ sudo /usr/local/sbin/inetd
$ telnet localhost
Entering character mode
Escape character is '^]'.


Linux 4.2.9-tinycore (box) (pts/1)

box login: tc
   ( '>')
  /) TC (\   Core is distributed with ABSOLUTELY NO WARRANTY.
 (/-_--_-\)           www.tinycorelinux.net

tc@box:~$

永続化

inetd.confを書いてinetdを起動しただけでは電源を切ると使えなくなってしまいますので、電源を切って次回起動した際もtelnetが使えるようにします。

永続化したいディレクトリやファイルは/opt/.filetool.txtに指定しますので/opt/.filetool.txtinetd.confを追加します。

$ echo usr/local/etc/inetd.conf >> /opt/.filetool.lst
$ filetool.sh -b

OS起動時に自動的にinetdが起動するようにします。

$ echo /usr/local/sbin/inetd >> /opt/bootlocal.sh
$ filetool.sh -b

再起動してtelnet接続できるか試してみます。

ftpサーバーも使える

inetutils-serversにはftpサーバであるftpdも含まれていますのでinetd.confに以下の行を追加すればftp接続もできるようになります。

inetd.conf
ftp stream tcp4 nowait root /usr/local/sbin/ftpd ftpd

ftpdはパスワードなし状態ではログインできないみたいですので、tcユーザにパスワードを設定するか新たにユーザを作るなどを考える必要があります。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?