| /etc/hosts.allow |
ALL : 192.168.0.60 # 接続を許可するクライアントの IP を追加 #ALL : LOCAL # End of hosts.allow. |
|---|---|
| /etc/inetd.conf | ftp 行のコメント記号を外す
#:STANDARD: These are standard services. telnet stream tcp nowait telnetd.telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd ftp stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.ftpd |
| vi ftp.sh ==> chmod 700 ftp.sh 実行権限を付加 | |
| ftp.sh |
#!/bin/sh # $Id: network.html,v 1.5 2003/09/03 01:44:05 sam Exp $ mput="nanka01.html nanka02.html" ### この行に転送するファイルを指定 ftp -n -d -v netftp.asahi-net.or.jp << _EOD user USER PASS ### ユーザー名とパスワードの指定 passive cd homepage ls prompt ### まとめて転送する hash ### 転送状況を 1024 bytes 毎に hash mark を表示 bell ### 転送終了時に bell(ビープ音)を鳴らす mput $mput bye _EOD ftp -n -d -v ftp.geocities.co.jp << _EOD user USER PASS ### ユーザー名とパスワードの指定 passive ls prompt ### まとめて転送する hash ### 転送状況を 1024 bytes 毎に hash mark を表示 bell ### 転送終了時に bell(ビープ音)を鳴らす mput $mput bye _EOD |
|---|---|
| 参考 URL | http://itpro.nikkeibp.co.jp/linux/faq/200104-4.shtml |
|---|---|
| 受信 |
$ telnet pop.asahi-net.or.jp 110 ### 110番ポートに接続 USER ***** ### ユーザー名 PASS ***** ### パスワード STAT ### メールの件数とバイト数を表示 LIST ### メールを番号をつけて表示 RETR 1 ### 1番のメールを表示 DELE 1 ### 1番のメールを削除 QUIT ### 受信終了 |
| 送信 |
$ telnet mail.asahi-net.or.jp 25 ### 25番ポートに接続 HELO hoge ### クライアントとサーバーに認識させる MAIL FROM:hoge@yahoo.com ### 送信元メールアドレスの入力 RCPT TO:huga@yahoo.com ### 送信先メールアドレスの入力 DATA ### メール本文の入力開始 Subject: test mail ### 件名の入力 From: huga@yahoo.com ### From の入力 テストメールです ### メール本文の入力 . ### メール本文の入力終了 QUIT ### 送信終了 |
$Id: network.html,v 1.5 2003/09/03 01:44:05 sam Exp $