So here is a little explanation about how to do it using some source files to compile it.
I used this webpage in order to get some help on how to install it, nevertheless I got some error message that were not referenced, neither on the website nor on google so I hope that help:
http://www.castaglia.org/proftpd/modules/mod_sftp.html#Installation
1) Download proftpd version 1.3.2 (only version compatible with mod_sftp)
ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.2.tar.gz
2) Download the mod_sftp module
from : http://www.castaglia.org/proftpd/#Modules I choose:
http://www.castaglia.org/proftpd/modules/proftpd-mod-sftp-0.9.6.tar.gz
3) Uncompress the proftpd-1.3.2.tar.gz tarball in /tmp/proftpd_source and then the proftpd-mod-sftp-0.9.6.tar.gz in the folder /tmp/proftpd_source/proftpd-1.3.2/modules
4) From a shell, run the configure in order to generate the Makefile
./configure --enable-openssl --with-modules=mod_sftp:mod_tls
(We indicate that we want both mod_sftp and mod_tls to be compiled by seperating them by a colon)
.
.
.
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking for ANSI C header files... (cached) yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating mod_sftp.h
config.status: mod_sftp.h is unchanged
5) Now you can launch the make (which will fail but we'll see how to fix that)
make
cd lib/ && make lib
make[1]: Entering directory `/tmp/proftpd_sftp/proftpd-1.3.2/lib'
make[1]: Nothing to be done for `lib'.
make[1]: Leaving directory `/tmp/proftpd_sftp/proftpd-1.3.2/lib'
cd src/ && make src
make[1]: Entering directory `/tmp/proftpd_sftp/proftpd-1.3.2/src'
make[1]: Nothing to be done for `src'.
make[1]: Leaving directory `/tmp/proftpd_sftp/proftpd-1.3.2/src'
cd modules/ && make static
make[1]: Entering directory `/tmp/proftpd_sftp/proftpd-1.3.2/modules'
make[2]: Entering directory `/tmp/proftpd_sftp/proftpd-1.3.2/modules/mod_sftp'
ar rc mod_sftp.a mod_sftp.o mod_sftp.o msg.o packet.o cipher.o mac.o compress.o kex.o keys.o crypto.o utf8.o session.o service.o kbdint.o auth-hostbased.o auth-kbdint.o auth-password.o auth-publickey.o auth.o disconnect.o rfc4716.o keystore.o channel.o blacklist.o interop.o tap.o fxp.o scp.o
ranlib mod_sftp.a
make[2]: Leaving directory `/tmp/proftpd_sftp/proftpd-1.3.2/modules/mod_sftp'
make[1]: Leaving directory `/tmp/proftpd_sftp/proftpd-1.3.2/modules'
test -z """" -a -z """" || (cd modules/ && make shared)
test -z """" || (cd locale/ && make locale)
/bin/sh ./libtool --mode=link --tag=CC gcc -L./lib -o proftpd src/main.o src/timers.o src/sets.o src/pool.o src/str.o src/table.o src/regexp.o src/dirtree.o src/expr.o src/support.o src/netaddr.o src/inet.o src/child.o src/parser.o src/log.o src/lastlog.o src/xferlog.o src/bindings.o src/netacl.o src/class.o src/scoreboard.o src/help.o src/feat.o src/netio.o src/response.o src/data.o src/modules.o src/display.o src/auth.o src/fsio.o src/mkhome.o src/ctrls.o src/event.o src/var.o src/throttle.o src/trace.o src/encode.o src/proctitle.o src/pidfile.o src/env.o src/version.o modules/mod_core.o modules/mod_xfer.o modules/mod_auth_unix.o modules/mod_auth_file.o modules/mod_auth.o modules/mod_ls.o modules/mod_log.o modules/mod_site.o modules/mod_delay.o modules/mod_facts.o modules/mod_ident.o modules/mod_cap.o modules/mod_auth_pam.o modules/mod_tls.o modules/mod_sftp.o modules/module_glue.o -lssl -lcrypto -lssl -lcrypto -lcap -lssl -lcrypto -lpam -lsupp -lcrypt
mkdir .libs
gcc -o proftpd src/main.o src/timers.o src/sets.o src/pool.o src/str.o src/table.o src/regexp.o src/dirtree.o src/expr.o src/support.o src/netaddr.o src/inet.o src/child.o src/parser.o src/log.o src/lastlog.o src/xferlog.o src/bindings.o src/netacl.o src/class.o src/scoreboard.o src/help.o src/feat.o src/netio.o src/response.o src/data.o src/modules.o src/display.o src/auth.o src/fsio.o src/mkhome.o src/ctrls.o src/event.o src/var.o src/throttle.o src/trace.o src/encode.o src/proctitle.o src/pidfile.o src/env.o src/version.o modules/mod_core.o modules/mod_xfer.o modules/mod_auth_unix.o modules/mod_auth_file.o modules/mod_auth.o modules/mod_ls.o modules/mod_log.o modules/mod_site.o modules/mod_delay.o modules/mod_facts.o modules/mod_ident.o modules/mod_cap.o modules/mod_auth_pam.o modules/mod_tls.o modules/mod_sftp.o modules/module_glue.o -L/tmp/proftpd_sftp/proftpd-1.3.2/lib -lcap -lssl -lcrypto -lpam -lsupp -lcrypt
modules/mod_sftp.o(.text+0xb2): In function `sftp_get_client_version':
: undefined reference to `sftp_interop_handle_version'
modules/mod_sftp.o(.text+0x18f): In function `sftp_cmd_loop':
: undefined reference to `sftp_kex_send_first_kexinit'
modules/mod_sftp.o(.text+0x1be): In function `sftp_cmd_loop':
: undefined reference to `sftp_kex_init'
modules/mod_sftp.o(.text+0x1c3): In function `sftp_cmd_loop':
: undefined reference to `sftp_service_init'
modules/mod_sftp.o(.text+0x1c8): In function `sftp_cmd_loop':
: undefined reference to `sftp_auth_init'
modules/mod_sftp.o(.text+0x1cd): In function `sftp_cmd_loop':
: undefined reference to `sftp_channel_init'
modules/mod_sftp.o(.text+0x1d9): In function `sftp_cmd_loop':
: undefined reference to `sftp_ssh2_packet_set_poll_timeout'
modules/mod_sftp.o(.text+0x252): In function `sftp_cmd_loop':
: undefined reference to `sftp_ssh2_packet_handle'
modules/mod_sftp.o(.text+0x418): In function `set_sftpauthmeths':
: undefined reference to `sftp_kbdint_have_drivers'
modules/mod_sftp.o(.text+0x559): In function `set_sftpauthorizedkeys':
: undefined reference to `sftp_keystore_supports_store'
modules/mod_sftp.o(.text+0x6f4): In function `set_sftpciphers':
: undefined reference to `sftp_crypto_get_cipher'
modules/mod_sftp.o(.text+0x1458): In function `set_sftpdigests':
: undefined reference to `sftp_crypto_get_digest'
modules/mod_sftp.o(.text+0x226a): In function `set_sftptrafficpolicy':
: undefined reference to `sftp_tap_have_policy'
modules/mod_sftp.o(.text+0x22bf): In function `sftp_exit_ev':
: undefined reference to `sftp_keys_free'
modules/mod_sftp.o(.text+0x22da): In function `sftp_exit_ev':
: undefined reference to `sftp_crypto_free'
modules/mod_sftp.o(.text+0x2317): In function `sftp_mod_unload_ev':
: undefined reference to `sftp_utf8_free'
modules/mod_sftp.o(.text+0x2323): In function `sftp_mod_unload_ev':
: undefined reference to `sftp_crypto_free'
modules/mod_sftp.o(.text+0x237d): In function `sftp_postparse_ev':
: undefined reference to `sftp_keys_set_passphrase_provider'
modules/mod_sftp.o(.text+0x23d0): In function `sftp_init':
: undefined reference to `sftp_interop_init'
modules/mod_sftp.o(.text+0x23dc): In function `sftp_init':
: undefined reference to `sftp_keystore_init'
modules/mod_sftp.o(.text+0x260d): In function `sftp_sess_init':
: undefined reference to `sftp_crypto_set_driver'
modules/mod_sftp.o(.text+0x266a): In function `sftp_sess_init':
: undefined reference to `sftp_keys_get_hostkey'
modules/mod_sftp.o(.text+0x269a): In function `sftp_sess_init':
: undefined reference to `sftp_keys_have_hostkeys'
modules/mod_sftp.o(.text+0x26e9): In function `sftp_sess_init':
: undefined reference to `sftp_blacklist_set_file'
modules/mod_sftp.o(.text+0x271b): In function `sftp_sess_init':
: undefined reference to `sftp_channel_set_max_count'
modules/mod_sftp.o(.text+0x2784): In function `sftp_sess_init':
: undefined reference to `sftp_fxp_use_gmt'
modules/mod_sftp.o(.text+0x2789): In function `sftp_sess_init':
: undefined reference to `sftp_utf8_init'
modules/mod_sftp.o(.text+0x27f1): In function `sftp_sess_init':
: undefined reference to `sftp_kex_rekey_set_interval'
modules/mod_sftp.o(.text+0x27fe): In function `sftp_sess_init':
: undefined reference to `sftp_ssh2_packet_rekey_set_size'
modules/mod_sftp.o(.text+0x2834): In function `sftp_sess_init':
: undefined reference to `sftp_tap_set_policy'
modules/mod_sftp.o(.text+0x2883): In function `sftp_sess_init':
: undefined reference to `sftp_kex_rekey_set_timeout'
modules/mod_sftp.o(.text+0x2895): In function `sftp_sess_init':
: undefined reference to `sftp_kex_rekey_set_interval'
modules/mod_sftp.o(.text+0x28a1): In function `sftp_sess_init':
: undefined reference to `sftp_kex_rekey_set_timeout'
modules/mod_sftp.o(.text+0x28ad): In function `sftp_sess_init':
: undefined reference to `sftp_ssh2_packet_rekey_set_seqno'
modules/mod_sftp.o(.text+0x28b8): In function `sftp_sess_init':
: undefined reference to `sftp_ssh2_packet_rekey_set_size'
modules/mod_sftp.o(.text+0x28db): In function `sftp_sess_init':
: undefined reference to `sftp_kex_rekey_set_interval'
modules/mod_sftp.o(.text+0x28e9): In function `sftp_sess_init':
: undefined reference to `sftp_ssh2_packet_rekey_set_size'
modules/mod_sftp.o(.text+0x22e3): In function `sftp_exit_ev':
: undefined reference to `sftp_utf8_free'
modules/mod_sftp.o(.text+0x2386): In function `sftp_postparse_ev':
: undefined reference to `sftp_keys_get_passphrases'
collect2: ld returned 1 exit status
make: *** [proftpd] Error 1
6) The make failed because it does not find some libraries:
To solve this problem, we launch the last command run by the make but instead of
putting modules/mod_sftp.o we are going to put modules/mod_sftp/*.o
gcc -o proftpd src/main.o src/timers.o src/sets.o src/pool.o src/str.o src/table.o src/regexp.o src/dirtree.o src/expr.o src/support.o src/netaddr.o src/inet.o src/child.o src/parser.o src/log.o src/lastlog.o src/xferlog.o src/bindings.o src/netacl.o src/class.o src/scoreboard.o src/help.o src/feat.o src/netio.o src/response.o src/data.o src/modules.o src/display.o src/auth.o src/fsio.o src/mkhome.o src/ctrls.o src/event.o src/var.o src/throttle.o src/trace.o src/encode.o src/proctitle.o src/pidfile.o src/env.o src/version.o modules/mod_core.o modules/mod_xfer.o modules/mod_auth_unix.o modules/mod_auth_file.o modules/mod_auth.o modules/mod_ls.o modules/mod_log.o modules/mod_site.o modules/mod_delay.o modules/mod_facts.o modules/mod_ident.o modules/mod_cap.o modules/mod_auth_pam.o modules/mod_tls.o modules/mod_sftp/*.o modules/module_glue.o -L/tmp/proftpd_sftp/proftpd-1.3.2/lib -lcap -lssl -lcrypto -lpam -lsupp -lcrypt
7) We now get an error message regarding mktemp but as explained on www.castaglia.org, this is just a warning and can be ignored.
gcc -o proftpd src/main.o src/timers.o src/sets.o src/pool.o src/str.o src/table.o src/regexp.o src/dirtree.o src/expr.o src/support.o src/netaddr.o src/inet.o src/child.o src/parser.o src/log.o src/lastlog.o src/xferlog.o src/bindings.o src/netacl.o src/class.o src/scoreboard.o src/help.o src/feat.o src/netio.o src/response.o src/data.o src/modules.o src/display.o src/auth.o src/fsio.o src/mkhome.o src/ctrls.o src/event.o src/var.o src/throttle.o src/trace.o src/encode.o src/proctitle.o src/pidfile.o src/env.o src/version.o modules/mod_core.o modules/mod_xfer.o modules/mod_auth_unix.o modules/mod_auth_file.o modules/mod_auth.o modules/mod_ls.o modules/mod_log.o modules/mod_site.o modules/mod_delay.o modules/mod_facts.o modules/mod_ident.o modules/mod_cap.o modules/mod_auth_pam.o modules/mod_tls.o modules/mod_sftp/*.o modules/module_glue.o -L/tmp/proftpd_sftp/proftpd-1.3.2/lib -lcap -lssl -lcrypto -lpam -lsupp -lcrypt
modules/mod_sftp/fxp.o(.text+0x2077): In function `fxp_handle_create':
: the use of `mktemp' is dangerous, better use `mkstemp'
8)
./proftpd -l
Compiled-in modules:
mod_core.c
mod_xfer.c
mod_auth_unix.c
mod_auth_file.c
mod_auth.c
mod_ls.c
mod_log.c
mod_site.c
mod_delay.c
mod_facts.c
mod_ident.c
mod_auth_pam.c
mod_sftp.c
mod_tls.c
mod_cap.c
9) You won't be able to run make install for the same reason (due to the path problem) and therefore you will have to manually copy the proftpd in /usr/local/sbin
10) You can now configure the proftpd.conf file in /usr/local/etc
[root@sv210 sbin]# more ../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 "ProFTPD FTP "
ServerType standalone
ServerIdent off
DefaultServer on
MasqueradeAddress (enter ip adress seen from the internet or host here)
# Port 21 is the standard FTP port.
Port 21
# Disable Name resolution in order to shorten the waiting time for user
UseReverseDNS off
IdentLookups off
# Don't use IPv6 support by default.
UseIPv6 off
# Ports to be used by the server working in passive mode
PassivePorts 35700 35900
# 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 under which the server will run.
User nobody
Group nobody
# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
DefaultRoot ~
# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd).
MaxInstances 30
# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
#DefaultRoot ~
# Normally, we want files to be overwriteable.
AllowOverwrite on
# Bar use of SITE CHMOD by default
DenyAll
# A basic anonymous configuration, no upload directories. If you do not
# want anonymous users, simply delete this entire
#
# 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
TimeoutLogin 600
TimeoutIdle 14400
TimeoutNoTransfer 14400
# We want 'welcome.msg' displayed at login, and '.message' displayed
# in each newly chdired directory.
# DisplayLogin welcome.msg
# DisplayChdir .message
# Limit WRITE everywhere in the anonymous chroot
#
# DenyAll
#
#
#Bind
Port 21
ServerName "FTP Server"
IdentLookups off
SFTPEngine on
SFTPLog /etc/proftpd/sftp/sftp.log
# Configure the server to listen on the normal SSH2 port, port 22
Port 22
# Configure both the RSA and DSA host keys, using the same host key
# files that OpenSSH uses.
SFTPHostKey /etc/ssh/ssh_host_rsa_key
SFTPHostKey /etc/ssh/ssh_host_dsa_key
# Configure the file used for comparing authorized public keys of users.
SFTPAuthorizedUserKeys file:~/.sftp/authorized_keys
# Enable compression
SFTPCompression delayed
# Allow the same number of authentication attempts as OpenSSH.
#
# It is recommended that you explicitly configure MaxLoginAttempts
# for your SSH2/SFTP instance to be higher than the normal
# MaxLoginAttempts value for FTP, as there are more ways to authenticate
# using SSH2.
MaxLoginAttempts 6
TLSEngine on
TLSLog /var/ftpd/tls.log
TLSProtocol TLSv1
# Are clients required to use FTP over TLS when talking to this server?
TLSRequired on
# Server's certificate
TLSRSACertificateFile /usr/local/certs/server.cert.pem
TLSRSACertificateKeyFile /usr/local/certs/server.key.pem
# CA the server trusts
TLSCACertificateFile /usr/local/certs/ca.cert.pem
# Authenticate clients that want to use FTP over TLS?
TLSVerifyClient off
TLSOptions NoCertRequest