(PuTTYユーザマニュアル) 3.6 生のTCP接続を作る - 3.6 Making raw TCP connections

http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter3.html#using-rawprotの日本語訳です。<< 3.5 SSHでポート転送を使う - 目次に戻る - 3.7 ローカルのシリアルラインに接続する >>

訳文

インターネットのプロトコルにはプレインテキストのコマンドとレスポンスで構成されているものが多くあります。たとえば、SMTP(Eメール転送のためのプロトコル)やNNTP(Usenetニュース転送のためのプロトコル)、HTTP(Webページ提供のためのプロトコル)はすべて人が読めるプレインテキストのコマンドで構成されています。

A lot of Internet protocols are composed of commands and responses in plain text. For example, SMTP (the protocol used to transfer e-mail), NNTP (the protocol used to transfer Usenet news), and HTTP (the protocol used to serve Web pages) all consist of commands in readable plain text.

これらのサービスに直接接続して、プロトコルによる会話を「手動で」(つまり、プロトコルのコマンドを入力し、レスポンスを目視することで)行いたいこともあります。Unixマシンの場合、telnetコマンドで適切なポート番号へ接続することでこれを行えます。例えば、telnet mailserver.example.com 25のようにすれば、メールサーバのSMTPサービスと直接やりとりできるでしょう。

Sometimes it can be useful to connect directly to one of these services and speak the protocol ‘by hand’, by typing protocol commands and watching the responses. On Unix machines, you can do this using the system's telnet command to connect to the right port number. For example, telnet mailserver.example.com 25 might enable you to talk directly to the SMTP service running on a mail server.

Unixではtelnetプログラムでこの処理を行えますが、実際にはtelnetプロトコルは使っていません。実際には何のプロトコルでもありません。接続を通して入力したバイト列をそのまま送信し、サーバが送信したバイト列をそのまま表示しているのです。Unixtelnetはサービスが本物のTelnetサービスかどうかを検知したり推測したりしようとします。PuTTYではきちんと区別しています。

Although the Unix telnet program provides this functionality, the protocol being used is not really Telnet. Really there is no actual protocol at all; the bytes sent down the connection are exactly the ones you type, and the bytes shown on the screen are exactly the ones sent by the server. Unix telnet will attempt to detect or guess whether the service it is talking to is a real Telnet service or not; PuTTY prefers to be told for certain.

この手のサービスの接続をデバッグするために、「セッション」設定パネルの「接続タイプ」ラジオボタンの中から4番目の「Raw」を選びます。(4.1.1.節を参照)ホスト名とポート番号を入力すると接続を行えます。

In order to make a debugging connection to a service of this type, you simply select the fourth protocol name, ‘Raw’, from the ‘Protocol’ buttons in the ‘Session’ configuration panel. (See section 4.1.1.) You can then enter a host name and a port number, and make the connection.

<< 3.5 SSHでポート転送を使う - 目次に戻る - 3.7 ローカルのシリアルラインに接続する >>