CentOS 6 ftpのActiveモード

最近のftpはpassiveモードが当たり前らしくて、いざActiveモードでつなげるとなると余計な手順が必要だったり…..

# ftp -h
        Usage: { ftp | pftp } [-pinegvtd] [hostname]
           -p: enable passive mode (default for ftp and pftp)
           -i: turn off prompting during mget
           -n: inhibit auto-login
           -e: disable readline support, if present
           -g: disable filename globbing
           -m: don’t force data channel interface to the same as control channel
           -v: verbose mode
           -t: enable packet tracing [nonfunctional]
           -d: enable debugging

# ftp

ftp>passive
Passive mode off.

これでon/off切り替えしたり。

違うftpもありやんす。

# ftp -h

        Usage: { ftp | pftp } [-Apinegvtd] [hostname]
           -A: enable active mode
           -p: enable passive mode (default for ftp and pftp)
           -i: turn off prompting during mget
           -n: inhibit auto-login
           -e: disable readline support, if present
           -g: disable filename globbing
           -m: don’t force data channel interface to the same as control channel
           -v: verbose mode
           -t: enable packet tracing [nonfunctional]
           -d: enable debugging

ftp -A とかすればいいのですね。