我已经在Centos Server中安装了proftpd,主要用于安全的ftp访问。 但是,用户通常能够访问sftp服务器。
当我使用ftpwho检查每个FTP会话的当前进程信息时,出现如下错误。
30525 (none) [15h27m] (authenticating) 30686 (none) [15h26m] (authenticating) 31927 (none) [15h26m] (authenticating) 32029 (none) [15h25m] (authenticating) 32251 (none) [15h25m] (authenticating) 32364 (none) [15h24m] (authenticating) 18396 (none) [ 14h9m] (authenticating) 19608 (none) [ 14h9m] (authenticating) 19726 (none) [ 14h9m] (authenticating) 19887 (none) [ 14h8m] (authenticating) 20059 (none) [ 14h8m] (authenticating) 20092 (none) [ 14h7m] (authenticating) 20122 (none) [ 14h7m] (authenticating) 20262 (none) [ 14h7m] (authenticating)
以下是我的proftpdconfiguration文件
ServerName "ProFTPD" AuthUserFile /etc/proftpd/passwd.vhosts ServerType standalone DeferWelcome off DefaultServer on DefaultRoot ~ !wheel # Port 21 is the standard FTP port. IdentLookups off <IfModule mod_tls.c> TLSEngine on TLSProtocol SSLv23 TLSRequired off TLSRSACertificateFile /etc/ftpd-rsa.pem TLSRSACertificateKeyFile /etc/ftpd-rsa-key.pem TLSVerifyClient off TLSCipherSuite HIGH:MEDIUM:+TLSv1:!SSLv2:+SSLv3 TLSOptions NoSessionReuseRequired </IfModule> #AuthPAM off TransferLog /usr/local/apache/domlogs/ftpxferlog UseReverseDNS off Port 7634 # Umask 022 is a good standard umask to prevent new dirs and files # from being group and world writable. Umask 022 # Set the user and group that the server normally runs at. User root Group nobody SFTPEngine On SFTPHostKey /etc/ssh/ssh_host_rsa_key SFTPHostKey /etc/ssh/ssh_host_dsa_key DefaultRoot /home # Normally, we want files to be overwriteable. <Directory /> AllowOverwrite on </Directory> # A basic anonymous configuration, no upload directories. <Anonymous ~ftp> UseFtpUsers on RequireValidShell off User ftp Group ftp # We want clients to be able to login with "anonymous" as well as "ftp" UserAlias anonymous ftp # Limit the maximum number of anonymous logins MaxClients 10 # We want 'welcome.msg' displayed at login, and '.message' displayed # in each newly chdired directory. DisplayLogin welcome.msg DisplayChdir .message true # Limit WRITE everywhere in the anonymous chroot <Limit WRITE> DenyAll </Limit> </Anonymous>
任何人都可以提供解决scheme。
ProFTPd的CentOS / RHEL版本没有内置mod_sftp。
您必须用支持重新编译它。 这里有一个很棒的博客,主题包括:
http://redhatvn.net/how-to-sftp-support-in-proftpd
我也应该注意到,在大多数情况下,sftp由OpenSSH守护进程处理。 ProFTPd的mod_sftp是一个相对较新的开发,也可能没有logging。