LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-13-2018, 10:47 AM   #1
catadetest
LQ Newbie
 
Registered: Mar 2018
Posts: 2

Rep: Reputation: Disabled
ftp connection closed before server asking for password


When trying to connect from machine1 (SUSE Linux) to example.com ftp server, I get "421 Service not available, remote server has closed connection." before the password input prompt. It never verified the password.

cata@machine1:~> ftp example.com
Connected to example.com.
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
Name (example.com:cata): username@example.com
421 Service not available, remote server has closed connection.

As you can see, it doesn't even verify the password.

But when I connect from machine2 (Ubuntu Linux), it works:

catalinubuntu@machine2:~> ftp example.com
Connected to example.com.
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 50 allowed.
Name (example.com:catalinubuntu): username@example.com
331 User username@example.com OK. Password required
Password:
As you can see, in this case, password prompt appears and I'm able to login. Is there any FTP client settings that I can adjust?

Last edited by catadetest; 03-13-2018 at 10:51 AM.
 
Old 03-14-2018, 08:48 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
This suggests there is some firewall at example.com that is allowing machine2's IP but not allowing machine1's IP.

Do you own example.com? Can you examine its firewall setup (either its own iptables/firewalld or external device used as firewall in front of it)?

The TLS suggests you're using ftps vs regular ftp. Be sure you pay attention to both ports 20 and 21 (and/or 990 depending on whether this is implicit or explicit).

If you don't own example.com you may need to send a request to the owner to whitelist your outbound IP from machine1.
 
Old 03-20-2018, 09:22 AM   #3
catadetest
LQ Newbie
 
Registered: Mar 2018
Posts: 2

Original Poster
Rep: Reputation: Disabled
No, example.com is someone else's server.
Turns out I can connect using the IP instead of the hostname.
Thanks
 
1 members found this post helpful.
Old 03-20-2018, 09:55 AM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
Originally Posted by catadetest View Post
Turns out I can connect using the IP instead of the hostname.Thanks
But you said machine1 can connect to example.com by name. This means you are resolving the IP from the name on machine1 but not on machine2. You might want to compare setup of the two. What is in /etc/resolv.conf? What is in /etc/hosts?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
data connection closed when ftp from KVM to other host danyim Linux - Networking 3 04-26-2013 06:09 AM
ftp connection closed by host in aix 5.3 kafedo AIX 0 01-22-2013 09:45 PM
Using TightVNC after entering the password I get connection closed popup rmitch06500 Linux - Virtualization and Cloud 3 11-13-2009 12:03 AM
ftp - connection closed by remote host adimande Linux - Networking 1 01-16-2006 04:32 AM
Ftp Connection closed by remote host 360 Linux - Networking 16 05-29-2002 04:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration