電子發(fā)燒友App

硬聲App

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會(huì)員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識(shí)你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示
創(chuàng)作
電子發(fā)燒友網(wǎng)>電子資料下載>嵌入式開發(fā)>圖文詳解如何在LINUX系統(tǒng)上建立FTP加密傳輸

圖文詳解如何在LINUX系統(tǒng)上建立FTP加密傳輸

2017-11-07 | rar | 0.2 MB | 次下載 | 1積分

資料介紹

圖文詳解如何在LINUX系統(tǒng)上建立FTP加密傳輸作者:llzqq
  聯(lián)系:llzqq@126.com
  來自:www.chinaunix.net
  在眾多的FTP服務(wù)器中PROFTPD由于它的配置靈活,安裝簡便。近年來一直受到人們的喜愛。通常情況下FTP包括認(rèn)證過程,傳輸是明文傳輸?shù)模趥鬏斠恍┟舾袛?shù)據(jù)時(shí)總是不能讓人放心。今天我在網(wǎng)上找了一些零散的資料結(jié)合自己的實(shí)作寫了個(gè)帖子貢獻(xiàn)給大家。
  下載最新的軟件版本:
  # wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.0rc3.tar.gz
  首先創(chuàng)建ROFTPD運(yùn)行的用戶和組:
  # groupadd nogroup
  # useradd –g nogroup –d /dev/null –s /sbin/nologin nobody
  首先創(chuàng)建上傳下載的用戶和組:
  # groupadd ftp
  # useradd –g ftp –d /home/down –s /sbin/nologin down
  # useradd –g ftp –d /home/upload –s /sbin/nologin upload
  用戶密碼設(shè)置略
  編譯安裝PROFRPD:
  # tar –zxvf proftpd-1.3.0rc3.tar.gz
  # cd proftpd-1.3.0rc3
  # 。/configure
  --prefix=/usr/local/proftpd
  --sysconfdir=/etc
  --enable-autoshadow
  --localstatedir=/var/run
  --enable-ctrls
  --with-modules=mod_tls
  # make
  # make install
  配置PROFTPD服務(wù)器:
  # vi /etc/proftpd.conf
  ================+================+=================
  # This is a basic ProFTPD configuration file (rename it to
  # ‘proftpd.conf’ for actual use. It establishes a single server
  # and a single anonymous login. It assumes that you have a user/group
  # “nobody” and “ftp” for normal operation and anon.
  ServerName “l(fā)lzqq”
  ServerType standalone
  DefaultServer on
  AllowRetrieveRestart on
  AllowStoreRestart on
  ServerType standalone
  ServerIdent on
  SystemLog /var/log/proftpd.log
  UseReverseDNS off
  IdentLookups off
  RequireValidShell off
  # Port 21 is the standard FTP port.
  Port 21
  # Umask 022 is a good standard umask to prevent new dirs and files
  # from being group and world writable.
  Umask 022
  MaxInstances 100
  # Set the user and group under which the server will run.
  User nobody
  Group nogroup
  # To cause every FTP user to be “jailed” (chrooted) into their home
  # directory, uncomment this line.
  DefaultRoot ~
  # Normally, we want files to be overwriteable.
  《Directory /》
  AllowOverwrite on
  《/Directory》
  # We want ‘welcome.msg’ displayed at login, and ‘.message’ displayed
  # in each newly chdired directory.
  DisplayLogin .welcome
  DisplayFirstChdir .message
  # Limit User of being enbled login ftp server
  《Limit LOGIN》
  AllowGroup ftp
  DenyAll
  《/Limit》
  #########################ssl/tls############################
  # MOD_TLS SETTING
  《IfModule mod_tls.c》
  TLSEngine on
  TLSLog /var/log/proftpd-tls.log
  TLSProtocol SSLv23
  # Are clients required to use FTP over TLS when talking to this server?
  TLSRequired ctrl
  # Server‘s certificate
  TLSRSACertificateFile /etc/proftpd.crt
  TLSRSACertificateKeyFile /etc/proftpd.key
  # Authenticate clients that want to use FTP over TLS
  TLSVerifyClient off
  #########################ssl/tls############################
  《Directory /home/down》
  《Limit WRITE》
  DenyGroup ftp
  《/Limit》
  TransferRate RETR 150 group ftp
  《/Directory》
  《Directory /home/upload》
  《Limit RMD RNFR DELE RETR》
  DenyGroup ftp
  《/Limit》
  TransferRate STOR 150 group ftp
  《/Directory》
  MaxClientsPerHost 200
  PassivePorts 55000 56000
  ================+================+=================
  創(chuàng)建PROFTPD的日志文件:
  # touch /var/log/proftpd.log
  # touch /var/log/proftpd-tls.log
  # chown nobody:nogroup /var/log/proftpd.log /var/log/proftpd-tls.log
  創(chuàng)建SSL傳輸?shù)淖C書和密匙:
  # cp /usr/share/ssl/openssl.cnf 。/
  # openssl req -new -x509 -nodes -config openssl.cnf -out proftpd.crt –keyout proftpd.key
  這里安裝提示需要輸入證書信息
  把證書和密匙復(fù)制到指定目錄:
  # cp proftpd.crt proftpd.key /etc/
  最后創(chuàng)建PROFTPD啟動(dòng)教本:
  # vi /etc/init.d/proftpd
  ================+================+=================
  #!/bin/sh
  # Startup script for ProFTPD
  # chkconfig: 345 85 15
  # description: ProFTPD is an enhanced FTP server
  # processname: proftpd
  # config: /etc/proftpd.conf
  # Source function library.
  。 /etc/rc.d/init.d/functions
  if [ -f /etc/sysconfig/proftpd ]; then
  。 /etc/sysconfig/proftpd
  fi
  PATH=“$PATH:/usr/local/proftpd/sbin”
  # See how we were called.
  case “$1” in
  start)
  echo -n “Starting proftpd: ”
  daemon proftpd $OPTIONS
  echo
  touch /var/lock/subsys/proftpd
  ;;
  stop)
  echo -n “Shutting down proftpd: ”
  killproc proftpd
  echo
  rm -f /var/lock/subsys/proftpd
  ;;
  status)
  status proftpd
  ;;
  restart)
  $0 stop
  $0 start
  ;;
  reread)
  echo -n “Re-reading proftpd config: ”
  killproc proftpd -HUP
  echo
  ;;
  suspend)
  hash ftpshut 》/dev/null 2》&1
  if [ $? = 0 ]; then
  if [ $# -gt 1 ]; then
  shift
  echo -n “Suspending with ’$*‘ ”
  ftpshut $*
  else
  echo -n “Suspending NOW ”
  ftpshut now “Maintanance in progress”
  fi
  else
  echo -n “No way to suspend ”
  fi
  echo
  ;;
  resume)
  if [ -f /etc/shutmsg ]; then
  echo -n “Allowing sessions again ”
  rm -f /etc/shutmsg
  else
  echo -n “Was not suspended ”
  fi
  echo
  ;;
  *)
  echo -n “Usage: $0 {start|stop|restart|status|reread|resume”
  hash ftpshut
  if [ $? = 1 ]; then
  echo ’}‘
  else
  echo ’|suspend}‘
  echo ’suspend accepts additional arguments which are passed to ftpshut(8)‘
  fi
  exit 1
  esac
  if [ $# -gt 1 ]; then
  shift
  $0 $*
  fi
  exit 0
  ================+================+=================
  # chomd 755 /etc/init.d/proftpd
  # chkconfig –-add proftpd
  # chkconfig proftpd on
  到這里ftp服務(wù)器端安裝設(shè)置完畢,登陸服務(wù)器的客戶端我用了完全免費(fèi)的FileZilla(前兩天網(wǎng)上看到說FileZilla支持SSL不錯(cuò))。FileZilla的設(shè)置也比較簡單。本服務(wù)器支持兩種客戶端加密連接方式:
  1. FTP over ssl (顯示加密)方式連接。
  2. FTP over tls (顯示加密) 方式連接
下載該資料的人也在下載 下載該資料的人還在閱讀
更多 >

評論

查看更多

下載排行

本周

  1. 1TC358743XBG評估板參考手冊
  2. 1.36 MB  |  330次下載  |  免費(fèi)
  3. 2開關(guān)電源基礎(chǔ)知識(shí)
  4. 5.73 MB  |  6次下載  |  免費(fèi)
  5. 3100W短波放大電路圖
  6. 0.05 MB  |  4次下載  |  3 積分
  7. 4嵌入式linux-聊天程序設(shè)計(jì)
  8. 0.60 MB  |  3次下載  |  免費(fèi)
  9. 5基于FPGA的光纖通信系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)
  10. 0.61 MB  |  2次下載  |  免費(fèi)
  11. 6基于FPGA的C8051F單片機(jī)開發(fā)板設(shè)計(jì)
  12. 0.70 MB  |  2次下載  |  免費(fèi)
  13. 751單片機(jī)窗簾控制器仿真程序
  14. 1.93 MB  |  2次下載  |  免費(fèi)
  15. 8基于51單片機(jī)的RGB調(diào)色燈程序仿真
  16. 0.86 MB  |  2次下載  |  免費(fèi)

本月

  1. 1OrCAD10.5下載OrCAD10.5中文版軟件
  2. 0.00 MB  |  234315次下載  |  免費(fèi)
  3. 2555集成電路應(yīng)用800例(新編版)
  4. 0.00 MB  |  33564次下載  |  免費(fèi)
  5. 3接口電路圖大全
  6. 未知  |  30323次下載  |  免費(fèi)
  7. 4開關(guān)電源設(shè)計(jì)實(shí)例指南
  8. 未知  |  21548次下載  |  免費(fèi)
  9. 5電氣工程師手冊免費(fèi)下載(新編第二版pdf電子書)
  10. 0.00 MB  |  15349次下載  |  免費(fèi)
  11. 6數(shù)字電路基礎(chǔ)pdf(下載)
  12. 未知  |  13750次下載  |  免費(fèi)
  13. 7電子制作實(shí)例集錦 下載
  14. 未知  |  8113次下載  |  免費(fèi)
  15. 8《LED驅(qū)動(dòng)電路設(shè)計(jì)》 溫德爾著
  16. 0.00 MB  |  6653次下載  |  免費(fèi)

總榜

  1. 1matlab軟件下載入口
  2. 未知  |  935054次下載  |  免費(fèi)
  3. 2protel99se軟件下載(可英文版轉(zhuǎn)中文版)
  4. 78.1 MB  |  537796次下載  |  免費(fèi)
  5. 3MATLAB 7.1 下載 (含軟件介紹)
  6. 未知  |  420026次下載  |  免費(fèi)
  7. 4OrCAD10.5下載OrCAD10.5中文版軟件
  8. 0.00 MB  |  234315次下載  |  免費(fèi)
  9. 5Altium DXP2002下載入口
  10. 未知  |  233046次下載  |  免費(fèi)
  11. 6電路仿真軟件multisim 10.0免費(fèi)下載
  12. 340992  |  191185次下載  |  免費(fèi)
  13. 7十天學(xué)會(huì)AVR單片機(jī)與C語言視頻教程 下載
  14. 158M  |  183278次下載  |  免費(fèi)
  15. 8proe5.0野火版下載(中文版免費(fèi)下載)
  16. 未知  |  138040次下載  |  免費(fèi)