Hi, got a bit of a strange one. I rebooted our server and it used to have FTP and SFTP both working, now only SFTP works (we need FTP for legacy reasons, not ideal but such is life).
We are using ProFTPD. I looked at the config gile and I am now even more confused, its has
...
LoadModule mod_sftp.c
<IfModule mod_sftp.c>
SFTPEngine on
Port <default port 2222 but free to change>
SFTPLog /var/log/proftpd/sftp.log
SFTPHostKey /etc/ssh/ssh_host_rsa_key
SFTPHostKey /etc/ssh/ssh_host_dsa_key
....
Which is odd as we re using 22 and it seems to be working fine.
Anyway, that aside is there something I can add to emable FTP on port 21?
Or do I use another service (i.e. vsftpd) to do FTP on 21? Can I run both as the same time?
ProFTPd offers SFTP on 2222 (and FTPS on the usual ports). OpenSSH runs on 22 and also happens to offers to offer SFTP, but its primary purpose is for ssh access…the two can’t share the port, so ProFTPd goes on 2222.
If you need the controls that ProFTPd provides (like not allowing running programs) you need to direct users to 2222 or FTPS and don’t give them an SSH login account.
Port 22 is ssh. FTP never runs on 22. You already have the usual default FTP ports (20/21) offering FTP and FTPS. There’s no reason to put FTP on port 22. Just allow your client to connect to the standard FTP ports.
Sorry, typo, meant FTP on port 21. port 21 seems to be closed
$ nmap -p 21 domain.tld
Starting Nmap 7.60 ( https://nmap.org ) at 2020-05-05 23:46 BST
Nmap scan report for tvpp.tv (213.171.x.x)
Host is up (0.013s latency).
rDNS record for 213.171.204.107: mysever.live-servers.net
PORT STATE SERVICE
21/tcp closed ftp
Nmap done: 1 IP address (1 host up) scanned in 0.10 seconds