メインコンテンツまでスキップ

例

ファイル転送の例です。「S」は送信側、つまりユーザプロセスです。「R」はリモートサーバからの応答です。サーバの応答はすべて <NULL> で終端されることに注意してください。応答が複数行にわたる場合、各行は <CRLF> で終わります。

R: (listening for connection)
S: (opens connection to R)
R: +MIT-XX SFTP Service
S: USER MKL
R: +MKL ok, send password
S: PASS foo
R: ! MKL logged in
S: LIST F PS: <MKL>
R: +PS: <MKL>
Small.File
Large.File
S: LIST V
R: +PS: <MKL>
Small.File 1 69(7) P775240 2-Aug-84 20:08 MKL
Large.File 100 255999(8) P770000 9-Dec-84 06:04 MKL
S: RETR SMALL.FILE
R: 69
S: SEND
R: This is a small file, the file is sent without
a terminating null.
S: DONE
R: +MIT-XX closing connection