Ubuntu 12.04
Sponsored Link

Vsftpd Over SSL/TLS2012/05/15

 
Vsftpd を SSL/TLS で使えるようにします。
[1] SSL/TLS の設定をします。
root@www:~#
cd /etc/ssl/private

root@www:/etc/ssl/private#
openssl req -x509 -nodes -newkey rsa:1024 -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem

Generating a 1024 bit RSA private key
......++++++
.......++++++
writing new private key to '/etc/ssl/private/vsftpd.pem'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:
JP
   
# 国

State or Province Name (full name) [Some-State]:
Hiroshima
   
# 地域(県)

Locality Name (eg, city) []:
Hiroshima
   
# 都市

Organization Name (eg, company) [Internet Widgits Pty Ltd]:
GTS
   
# 組織名

Organizational Unit Name (eg, section) []:
Server World
   
# 組織の部門名

Common Name (eg, YOUR name) []:
www.srv.world
   
# サーバーのFQDN

Email Address []:
xxx@srv.world
   
# 管理者アドレス
root@www:/etc/ssl/private#
chmod 400 vsftpd.pem

root@www:/etc/ssl/private#
vi /etc/vsftpd.conf
rsa_cert_file=/etc/ssl/private/vsftpd.pem
# 最終行に追記

ssl_enable=YES    
# SSL有効化

force_local_data_ssl=YES    
# SSL必須にする

force_local_logins_ssl=YES
   
# SSL必須にする
root@www:/etc/ssl/private#
service vsftpd restart

vsftpd stop/waiting
vsftpd start/running, process 1261
[2] クライアント側の設定です。SSL/TLS接続に対応した FileZilla を使います。 「ファイル」-「サイトマネージャ」と開き、以下のようにログイン情報を入力して、 「Server Type」には「明示的なTLS/SSL上のFTP」を選択して接続します。
[3] 独自証明書なので以下のような画面になります。問題ないので「了解」して進みます。
[4] 接続できました。
関連コンテンツ