SFTP works but FTP doesnt RH6

Latest response

I need to use FTP command instead of SFTP, for some reason im getting "connection refused"when I try.
The firewall has ports 21,22 open. Having a problem figuring out

Responses

Need more info:

  • are you trying to FTP from your RH6 host to another system or are you trying to use FTP to get files from your RH6 system
  • if the latter:
    • Have you installed and configured an FTP daemon?
    • Did you add appropriate rules to /etc/hosts.allow?

See Tom's good points above, his points are highly likely culprits.

I recall with RHEL 6 that they began using vsftpd as a kind of standard.

What is the output of the following on the system running (s)ftp? (and grep for ftp, and note the output)

root@yoursystem # netstat -taupel | grep ftp

On my RHEL 6.6 server running vsftpd, I get the following for output for the above command:

tcp  0  0  *:ftp   *:*  LISTEN  root 15001 2824/vsftpd

if you are using vsftpd, make sure to configure /etc/vsftpd/vsftpd.conf

Take a look if vsftpd is available up/running using "rpm -qa | grep ftp" and chkconfig/service/"ps -ef| grep ftp" commands

A couple of other things
- Try it temporarily without a firewall
- Try it temporarily in selinux permissive mode

ADDED: sftp is ssh based, and ftp is not.
ADDED: see this link where they discuss "pam_service_name=" (and verify if this is valid or good to proceed with or not), and absolutely compare with this Red Hat documentation. Take time to verify this sort of option, and weight the differences.

Again, really see Tom's suggestions first.

tcp 0 0 :ftp *: LISTEN root 1341094 -
udp 0 0 :ftps *: root 12596 -

rpm -qa | grep ftp
vsftpd-2.2.2-13.el6_6.1.i686
ftp-0.17-54.el6.i686

Gene, surround your code (like netstat output) with three tilde characters "~~~" above and below the output. That will make the asterisks visible, and is good to surround for other code.

Also, see Tom's questions above - thanks

Thank You for all responses, might be the firewall afterwall. checking it now

Hi Gene,

Did you try to login to the ftp server locally?
for the default config is an anonymous ftp server.

Are you trying to use it as an user based login ftp server? If so, you need an user login ftp user. You need to change the config.

So let's recap: do not get a login prompt, but cannot login or are you unable to connect from an outside source, but are able to login from the local server?

Kind regards,

Jan Gerrit Kootstra

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.