5

I just want to know if a FTP server is installed on my server. It is a Red Hat Enterprise Linux Server release 5.8 (Tikanga). I tried running the below command and got connection refused :

$ ftp localhost
ftp: connect: Connection refused
Raphael Ahrens
9,8715 gold badges39 silver badges53 bronze badges
asked Apr 27, 2016 at 6:53
3
  • 2
    can you be more specific regarding your linux distribution ? Commented Apr 27, 2016 at 6:58
  • 2
    Which distribution of linux? Commented Apr 27, 2016 at 7:00
  • its Red Hat Enterprise Linux Server release 5.8 (Tikanga) Commented Apr 27, 2016 at 7:02

3 Answers 3

9

If you know the package name you could do something like

dpkg -l vsftpd

to see what the package is about.

If you don't have any idea about package name

On debian or debian based systems you may do

dpkg -l | grep ftp # grab everthing that contain ftp 

And with the results, you may do

dpkg -p result

On Redhat or Redhat based systems like Fedora , you may do

rpm -qa | grep ftp

and with the results

rpm -qi result # to know more about the package, whether it is the server itself or some suplimentary

On Systems like Fedora

yum list installed | grep ftp

Then do

yum info package_name
answered Apr 27, 2016 at 7:02
3
  • Why use --get-selections, -l is a lot simpler and just as good in this case. Commented Apr 27, 2016 at 7:05
  • @Henrik : Updated and thanks for the info. I recently migrated from Redhat to Debian and am getting used to it Commented Apr 27, 2016 at 7:20
  • 1
    and no need for grep with dpkg either - dpkg -l '*ftp*' works just fine (the single quotes are to avoid shell globbing in case there are files or sub-directories that match *ftp* in the current directory). Commented Apr 27, 2016 at 8:26
3

ftp is installed, otherwise you would get some "command not found error" what is not installed, or not configured is the FTP server (probably ftpd)

answered Apr 27, 2016 at 6:59
2

If You are a RHEL user you can use:

service vsftpd status

It will give the following response if the service is not running :

vsftpd: unrecognized service

and if the service is running in your server:

vsftpd (pid XXXX) is running...

You are getting ftp: connect: Connection refused because you have the FTP client installed in the system but FTP server is not installed. You can install the FTP server vsftpd and try the same it should work.

sebasth
15.7k6 gold badges53 silver badges71 bronze badges
answered Aug 30, 2017 at 16:49

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.