-1

I'm running Ubuntu 20 and have installed Pure-FTPd. When I SFTP on port 22 with FileZilla the log shows "We claim SSH-2.0 FileZilla ... Remote version SSH-2.0 OpenSSH..." On login with FileZilla, auth.log shows an ssh2 connection.

I'm confused about why I don't see something like "Welcome to Pure-FTPd [privsep] [TLS]". The service is running. I haven't read anywhere that we need to do anything to tell OpenSSH to hand over SFTP requests to another process. I'm guessing that something else needs to be set under /etc/ssh/sshd_config.d ?

It doesn't look like the PureFTPd service is processing these requests at all, with its own user db or other settings.

Thanks.

TonyG
  • 151
  • 8
  • 2
    No, SFTP is not FTP over SSH. You don't need an FTP server here at all. Uninstall it. – Michael Hampton Oct 08 '20 at 22:42
  • Or if you really want to use FTP, you need to connect to FTP port 21 with FTP client. – Martin Prikryl Oct 09 '20 at 06:22
  • @MichaelHampton I eliminated the incorrect/controversial comment about SFTP/SSH so that this question stays focused. Thanks. But your note about what I don't need is misplaced as well. There is nothing in the question about my reasoning for using FTP so your assessment has no basis. – TonyG Oct 10 '20 at 21:20
  • @MartinPrikryl if I just wanted insecure FTP rather than SFTP, I wouldn't be asking this question related to SSH. But thanks for your suggestion as well. – TonyG Oct 10 '20 at 21:20
  • @MartinPrikryl - I'll rephrase that more respectfully : Yes, I want Secure FTP, single port/channel, which I believe is obtained through OpenSSH. I'm just confused about how PureFTPd is intended to work in partnership with OpenSSH ( IF that is the case ) and how to get the benefits of that application, which includes a MySQL database for users and other settings in the conf files. – TonyG Oct 10 '20 at 21:28
  • 1
    Again, Pure-FTPD has nothing to do with SFTP. It does FTP, and maybe FTPS, but neither of those are what you claim to want. Uninstall it. – Michael Hampton Oct 10 '20 at 21:41
  • Secure FTP is NOT SFTP. Secure FTP is FTPS which uses SSL-now-TLS in two variants: 'implicit' FTPIS on port 990 and 'explicit' FTPES on port 21 (i.e. the same _port_ as original, insecure FTP). PureFTPd implements at least one of these. SFTP is an entirely different protocol that is NOT FTP and uses SSH on port 22 and is implemented by OpenSSH NOT PureFTPd. FileZilla supports BOTH: it has two protocols, FTP and SFTP, and within FTP is has options for explicit or implicit FTP over TLS, or no TLS = insecure. To repeat, SFTP is not FTP and does not use PureFTPd. – dave_thompson_085 Oct 11 '20 at 01:52
  • @MartinPrikryl actually did provide the concise, definitive answer: "you need to connect to FTP port 21 with FTP client." On FTP/21+TLS I got the expected PureFTPd welcome message. _That_ clears the confusion about why there was no PureFTPd response on port 22. If Martin posts his comment as an Answer I will accept it. For whomever downvoted a question that clearly says "Confused" as the first word in the topic, personally I think that was pretty crappy. But thanks to all for comments that sank in after follow-up research. – TonyG Oct 11 '20 at 02:41

1 Answers1

-2

SSHD runs on port 22 by default. There is no handing over, when a process is started and a port is allocated, that port belongs to that application until it stops running or is terminated.

You need to set a different port for sftp, or disable sshd.

To test this quickly, simply kill sshd and start ftpd.

ps -ef | grep sshd

kill -9

Where is the process id of the sshd process.

Andrew Carr
  • 107
  • 2