I have been able to set up a SFTP server using vsftpd on Ubuntu 14.04.

However, I want to experiment with plain (unencrypted) FTP to see the unencrypted packets using wireshark.

To set up the SFTP server I followed this guide - it is composed of two sections: the first is for plain FTP, the second for SFTP.

I managed to get SFTP working, but not plain FTP. Filezilla returns an error, when I try to connect using plain FTP:

Response:       SSH-2.0-OpenSSH_6.2p2 Ubuntu-6ubuntu0.4
Error:  Cannot establish FTP connection to an SFTP server. Please select proper protocol.
Error:  Critical error
Error:  Could not connect to server

It returns this message, although I have removed and purged vsftpd and reinstalled it, then made configuration of the first section only.

Does vsftpd support plain FTP and how do I apply it?

  • The problem could be on the client or server side. Let's look at one side at a time. If you use the ftp command instead of filezilla, does it work? Jul 4, 2014 at 13:24
  • I have entered 'ftp mohamed@ 22`, it returned "Name or service not known". Jul 4, 2014 at 13:53
  • Type just ftp . If it can connect, ftp will then ask for your username and password. Don't type 22; plain FTP does not use port 22. Jul 4, 2014 at 13:56
  • Again "Name or service not known"! Jul 4, 2014 at 14:05
  • OK. I will have to install 14.04 later today to try to reproduce this problem. Jul 4, 2014 at 14:10

2 Answers 2


In spite of its name it supports FTP. The name VSFTPD stands for "Very Secure File Transport Protocol Daemon".


The FTP (File Transfer Protocol) is used as one of the most common means of copying files between computers over the Internet. Most web based download sites use the built in FTP capabilities of web browsers and therefore most server oriented operating systems usually include an FTP server application as part of the software suite. Linux is no exception. With this page I will show how to convert a DebianGNU/Linux box into an FTP server using the vsftpd (Very Secure FTP Daemon) package which is included with the standard Debian distribution i.e. no need to compile anything ourselves which saves time and makes things work even for the inexperienced users.

Source: http://www.markus-gattol.name/ws/vsftpd.html

There are many tutorials, such as this one titled: How To Configure vsftpd to Use SSL/TLS on an Ubuntu VPS that show how to setup regular FTP service using vsftpd. The first section describes the steps.

After editing the config file: sudo nano /etc/vsftpd.conf:


Then add a ftp user:

$ sudo adduser ftpuser

Then create their home directory:

$ sudo chown root:root /home/ftpuser

And create directories for them to upload/download to within:

$ sudo mkdir /home/ftpuser/files
$ sudo chown ftpuser:ftpuser /home/ftpuser/files

Using Filezilla

When you use filezilla be sure you're selected the appropriate port and protocol type in the site manager dialog.

    ss #1


  • Sorry, this didn't solve the problem, perhaps I am doing something wrong. I am still seeing SHHv2 packets when transmitting the file. Jul 4, 2014 at 13:12
  • 1
    @MohamedAhmed - something else must be up with your config file. I use this to run both a anon and non-anon FTP server, can you post your entire file via pastebin?
    – slm
    Jul 4, 2014 at 13:15
  • pastebin.com/U32BWhK6 Jul 4, 2014 at 13:39
  • @MohamedAhmed - see update. I'd also comment out the config lines regarding rsa just to test it w/o them.
    – slm
    Jul 4, 2014 at 14:58
  • Actually I have specified the port to be 21 in the GUI of filezilla. Jul 4, 2014 at 15:36

There are three protocols with "FTP" in their names :

  1. The "plain" old, unencrypted FTP, operates on port 21
  2. The same, but with SSL added, generally referred to as FTPS, operates on port 21 or 990
  3. The FTP-like protocol which is part of SSH, generally referred to as SFTP, operates on port 22

Usually, 1 and 2 are provided by the same program, such as vsftpd, which will listen on port 21 and/or 990. 3 is provided by an SSH implementation, usually OpenSSH, which listens on port 22. Your problem is that you are trying to connect using the FTP protocol on port 22, so you reach OpenSSH, which handles only SFTP. You need to use port 21 if you want unencrypted FTP.

  • I think this not the case, I have specified Plain FTP and port 21 in Filezilla's site manager, when connecting, I the following message appears in the status panel: "Connection timed out, Failed to retrieve directory listing". Jul 4, 2014 at 13:11
  • 1
    The message you have pasted clearly shows that you are connecting to the port on which OpenSSH listens. If you have not changed the default setting, that's port 22.
    – fkraiem
    Jul 4, 2014 at 13:12
  • You mean I have to change the port in vsftpd.conf? Jul 4, 2014 at 13:13
  • 1
    No, you have to change the port in FileZilla to 21.
    – fkraiem
    Jul 4, 2014 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.