1822320 Members
6312 Online
109642 Solutions
New Discussion юеВ

FTP connection refused

 
SOLVED
Go to solution
M. Tariq Ayub
Regular Advisor

FTP connection refused

Hi,

While i am trying to ftp a linux machine i am getting the following error.

tariq@sydsep1# ftp 172.17.0.173
ftp: connect: Connection refused

The OS is Fedora core 2

I can do sftp
8 REPLIES 8
Stuart Browne
Honored Contributor

Re: FTP connection refused

'Connection refused' would mean that either the VsFTPd server isn't running, or has been blocked by the firewall.

On the linux server, check what 'service vsftpd status' reports.

If that says it is running, use 'iptables -nvL INPUT' and see if anything is blocking port 21.

But in reality, if you can 'sftp', then it's probably better anyway, being a secure, encrypted connection.
One long-haired git at your service...
M. Tariq Ayub
Regular Advisor

Re: FTP connection refused

[root@sydupft1 sysconfig]# ps -ef |grep VsFTPd
root 28034 27671 0 12:14 pts/5 00:00:00 grep VsFTPd

How can i start VsFTPd.
Gopi Sekar
Honored Contributor
Solution

Re: FTP connection refused


make sure you have installed vsftpd rpm package. it should be available either in first or second CD of FC2.

to run vsftpd daemon run, 'service vsftpd start'

it will launch vsftpd daemon and you can connect to it from remote. But this will be effective only for the current boot, to make it run automatically after every reboot run, 'chkconfig vsftpd on'

Hope this helps,
Gopi
Never Never Never Giveup
Steven E. Protter
Exalted Contributor

Re: FTP connection refused

ps -ef | grep ftpd

tail -f /var/log/messages

Additional diagnostics for the server. If you see log entries, then its probably not a firewall.

vsftpd is the default ftp daemon on Fedora Core 2.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bejoy C Alias
Respected Contributor

Re: FTP connection refused

Install the vsftpd rpm,
start the vsftpd service as 'service vsftpd start',
then try ftpying to the localhost itself to check whether the daemon is running. It should work if everything is ok. Then try ftpying from other pcs . If again the connection refused message comes that means ur firewall setting is blocking ftp connections. Try opening the port 21 in ur firewall setting.
Be Always Joy ......
xyko_1
Esteemed Contributor

Re: FTP connection refused

Hi all,

we must remember that ftp sometimes (most of the times I guess) runs over inet or xinet.

Tariq must verify if there is any ftp server installed on his system
rpm -qa | grep ftp will help him
verify if it's running over inet or xinet
/etc/inetd.conf for inet and
/etc/xinetd.d/some_ftp_server_config for xinetd

That's the very beginning point to verify.

Install it if necessary and configure conform his needs.

regards,
xyko
Steven E. Protter
Exalted Contributor

Re: FTP connection refused

xyko

Though ftp used to run via an inetd or xinetd daemon, vsftpd has its own daemon and has been removed from the xinetd daemon in Fedora Core 1 and above.

If not installed vsftpd must be explicitly installed.

rpm -ih /tmp/
# You can store it whereever you like
chkconfig --level 12345 vsftpd on
service vsftpd start

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
xyko_1
Esteemed Contributor

Re: FTP connection refused

Thanks Steven about your advise regarding Fedora's ftp choice.

regards,
xyko