sftp


Using VirtualHosts on a ProFTPd server

When using ProFTPd you may want to have the server listening on different ports, for example if you want to use FTP and SFTP at the same time. Here is an example: <VirtualHost 0.0.0.0 ftp.example.net> SFTPEngine off Port 21 DefaultRoot ~ Umask 022 022 AllowOverwrite on </VirtualHost> <VirtualHost 0.0.0.0 sftp.example.net> SFTPEngine on Port 2222 SFTPLog […]


Installing ProFTPd with Public Key Authentication on Ubuntu 16.04

First install proftpd: apt-get update apt-get install proftpd Next, change the following lines in /etc/proftpd/proftpd.conf: ServerName "sftp.example.net" DefaultRoot ~ Put in your hostname (if it resolves) or IP address as ServerName. The second line will jail the user to his home directory. Next, create the file /etc/proftpd/conf.d/sftp.conf with the following content: <IfModule mod_sftp.c> SFTPEngine on # If […]


Create Secure FTP Jails with OpenSSH on Debian/Ubuntu

If you don't have already OpenSSH-Server on your machine and you're connected probably via SSH, then we need to install it: apt-get update apt-get install openssh-server Next we modify the file /etc/ssh/sshd_config: Comment out the following line by prepending a #: Subsystem sftp /usr/lib/openssh/sftp-server And in the same file add this block right at the end: […]


SFTP Server with chroot on Debian

On Debian Etch, if you want to have a chroot'ed environment, a simple way to implement this is using mySecureShell. First we need to install some dependancies: apt-get install libssl0.9.7 ssh openssh-server   Then we install mySecureShell itself: wget https://www.devops.zone/wp-content/uploads/attachments/mysecureshell_0.95_i386.deb dpkg -i mysecureshell_0.95_i386.deb Now, to activate the new shell for a user, to have to modify the […]