Posts Tagged ‘FTP’

How to enable SFTP with Filezilla Server

June 30th, 2010

By default, Filezilla Server does not support FTP via SFTP. However if can use SSL / TLS, commonly referred to as FTPS .  It’s also a breeze to enable this in the Filezilla FTP Server Configuration. To do this, you simply have to do the following:

1.Access the Filezilla FTP server’s settings by going to Edit -> Settings.

2. Once in the Settings section, you will need to scroll down to the SSL / TLS settings section.

3.  Here you will need to check the “Enable FTP over SSL / TLS support (FTPS). Once you do this, the option to “Allow explicit FTP over TLS will be come available and Disallow plain unencrypted FTP” and “Force PROT P to encrypt file transfers in SSL/TLS mode. Be sure to check both.

4. Now you will need to click on the button “Generate new certificate..”. Once you do this, you will be presented with the following screen;

5. Be sure to check check either 1024 bit, 2048 bit or 4096 bit. Since this is a self signed SSL, you can choose 4096 bit.  Now you will need to fill out the rest of he required sections. Once you completed this, be sure to specify a valid location to save the key and certificate to. Once you have, click “Generate certificate”.

6. Filezilla server will now be setup to only use FTPS/FTPSE and will reject any FTP connections over port 21. Your new port will be 990. If you try to use conventional ftp to access the server, you may receive the error that you have to use explicit SSL / TLS before logging in.

7. You will now need to specify port 990 in order to log into the ftp server. Upon logging in, you will need to accept the SSL for the server now. You will have the option as well to always trust the certificate for future sessions.

You have now secured Filezilla FTP server for use with only a FTPS connection. If at any time you wish to remove the SSL from the connection, simply log back into the FTP server and goto the SSL / TLS settings section and uncheck the “Enable FTP over SSL / TLS support (FTPS)” option.

Join the forum discussion on this post

Creating additional FTP Users In Plesk (Linux)

February 12th, 2010

Plesk for Linux, by default only allows one ftp users (While it does let you add multiple web users, they are locked to the same directory as the main ftp user). However you can get around this limitation by creating additional FTP users by creating them outside of Plesk, using SSH / Shell. The process is fairly simple as well and you can setup any directory structure that you want the new user to connect to, even for adding ftp access behind the root of a web directory if you like.

To do this, we simply need to do the following;

*Prior to doing this, make sure you already have an existing ftp user in place, as you will need their ID#

1. Log into your Linux server (Only applies to a dedicated server, colo server or virtual server – VPS).

2. Once you have logged in, you need to find an ID of an existing FTP user. To do this, simply type the following:

$id user     (user is the name of the existing ftp user)

3. If you have the user, you will be given an output that looks like this;

# uid=10002(user) gid=2524(psacln) groups=2524(psacln)

4. Take the uid number as you will need this to setup the new user.

5. Now, create the new user by using this command. Also with this command, you can set the directory you want them to have access to.;

/usr/sbin/useradd -u 10002 -o -d /var/www/vhosts/example.com/custom_folder -g psacln -s /bin/false newuser    (newuser is the name if the new account)

6. The new user has been created. Now you have to assign a password to it. To do this, type the following *make sure the password is not the same as the main Plesk ftp account*;

$passwd newuser password (Change password to the password you want to assign to the user)

7. It will then ask for you to confirm the password, type the password again. If done correctly, you will get the following message;

passwd: all authentication tokens updated successfully.

That’s it, the ftp user has been created. If you ever want to remove the user, you have to do it via command line as Plesk will not sure the user. To do this, simply type the following;

$/usr/sbin/userdel username

Not able to connect to FTP in Plesk

January 13th, 2009

If your FTP connection through Plesk fails, there are a few things you can check first.

1. Log into the server via SSH (if you are using windows, you will need a SSH client. I use Putty

2. Make sure you access su (root access).

Now that you are logged in, type te following;

ftp localhost

If you get the message of;

Connected to localhost(127.0.0.1).
220 ProFTPD 1.3.0 Server(ProFTPD)[127.0.0.1]
Name(localhost:user):

Then the ftp server is working correctly. However if you do not get that, but instead get this;

ftp:connect:Connection refused

Then there is an issue on the server. So to look into this further we need to make sure that the ftp service is running. Since this is Plesk, it will be running Proftpd and it will be running out of the Xinetd service. To verif y this, type the following;

service xinetd status

You should get the following;

xinetd (pid 23532) is running…

Now type;

lsof -i tcp:21

You should get;

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME xinetd 23532 root 5u IPv4 55265282 TCP *:ftp (LISTEN)

If you do, please try to run the FTP localhost command again.

Ftp localhost

If you get a message that states that service is not available, likely the problem is with the hostname isn’t set correctly.

To check the hostname, you simply need to type hostname at the server command line. It will return the hostname.  To change this, you will want to log into plesk and goto Server>Server Preferences and change it here. You will also want to type hostname and the name at the command line. As an example, if I wanted to change it on my server, I would type;

Hostname myservername.com

The name will then take affect. Once you have done this, restart Xinetd.

Lastly, if all else fails, you can review the log files for the service by using the following commands;

less /var/log/messages | grep proftp
less /var/log/messages | grep xinetd

What is the difference between SFTP and FTP over SSL/TLS?

December 16th, 2008

SFTP is an FTP protocol that runs on top of the SSH (Secure Shell) protocol, while SSL/TLS refers to standard FTP running on top of an SSL/TLS (Secure Sockets Layer/Transport Layer Security) connection. SSL/TLS provides 128-256 bit encryption. SSH provides 128-256 bit encryption as well.

Sidenote to this. I know filezilla server is  a popular FTP server application. HOWEVER!!! It does not support SFTP currently and is not in development at the moment and probably never will support this.