How can I determine which ftp server is running on my ubuntu box
Solution 1:
You can run sudo lsof to look at all the open files (which includes sockets) and find out which application uses TCP port 21 and/or 22.
Solution 2:
The command netstat -tanp
will show you what PID is associated with what port, look for a line like this to find what daemon is LISTENing on port 21:
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1450/sshd
But of course with port number 21 and not 22 (21 for ftp). Then you can use dpkg -S <binary>
to see what package is providing it. <binary>
is the name of the daemon on the last column of netstat, after the PID.
Solution 3:
Here's a "fun" way to do this. First you have to install dpkg-awk.
dpkg-awk 'Status:installed' 'Provides:ftp-server' -- Package
Translation: match on packages that are installed and that provide the ftp-server metapackage. Of those, print only the Package: line.
Solution 4:
telnet ip.addr.of.host ftp
You'll probably get a link that starts with 220 with the software name and version. For vsftpd:
220 (vsFTPd 2.0.4)