command prompt ftp

Status
Not open for further replies.
Messages
61
Reaction score
0
Points
6
Hello everyone,

First I'd like to say I'm not sure where I should post this question, but this seems like a good place to start. Now on to my question.
I can't connect to the ftp on my site using ftp from windows command prompt (other ftp programs work fine (windows explorer ftp and filezilla)), so my question is am I missing something for command prompt ftp to get that working?
Apparently I can connect (according to the command prompt), but I get a "Connection closed by remote host" error before I even get a chance to enter my username or password. Is there something on the server that prevents me from connecting via command prompt ftp?
Any help would be greatly appreciated ;)

As for the reason I want to use command prompt ftp, I want to automate the uploads of some files so I don't have to open a separate program every time, but just double click a batch file and it uploads it for me.
 

stpvoice

Community Support Rep
Community Support
Messages
5,987
Reaction score
212
Points
63
Why can't you use an FTP client? Do you have some sort of 'special file' that needs to be uploaded like that?
 
Messages
61
Reaction score
0
Points
6
Why can't you use an FTP client? Do you have some sort of 'special file' that needs to be uploaded like that?

As for the reason I want to use command prompt ftp, I want to automate the uploads of some files so I don't have to open a separate program every time, but just double click a batch file and it uploads it for me.
So no it's not the only way to upload the file (Filezilla and windows explorer work fine), but I would just prefer it to do it with command prompt as I can automate some parts of the uploading progress.
 

Sharky

Community Paragon
Community Support
Messages
4,399
Reaction score
94
Points
48
I could connect fine, all I did was issue the command "ftp <myhost>" in the command window, then it prompted for the username and password. All I can think of is that you have some sort of software firewall possibly blocking it?
 
Messages
61
Reaction score
0
Points
6
Ok thanks Sharky, that probably indicates some problem on my side of the connection. I've looked at my firewall and it isn't blocking anything atm and it doesn't work. I also tried turning it off completely and still no go.
I'll see if one of the other pcs in this house can connect via command prompt, maybe it's some setting in the router/modem that's blocking my connection...
Edit:
Alright none of the computers here can connect to the server. So I guess it's a problem with the modem/router, does anyone know if ftp actually needs forwarded ports? Because the problem might then be that command prompt doesn't have UPnP, while windows explorer and Filezilla do...
 
Last edited:

Sharky

Community Paragon
Community Support
Messages
4,399
Reaction score
94
Points
48
No, I don't believe so. That's why I thought of a software firewall, as it'd be application specific. To be honest, I really don't know what to suggest. Unless all of your PCs in the house have the same security software installed, and they're all blocking it?

Alternatively, try connecting to any other public FTP server, like ftp.microsoft.com (should be able to open a command prompt, and just type ftp ftp.microsoft.com ) using the username anonymous
 
Messages
61
Reaction score
0
Points
6
Not all computers here are using the same software, we have 2 with avast! and my computer has comodo.
I tried connecting to microsoft and that works! :biggrin: So maybe I'm just typing in something wrong...

Edit: Alright thanks guys, I can now connect. Apparently I need to cut off the ftp:// part I had in front of it the whole time :biggrin:
 
Last edited:

Sharky

Community Paragon
Community Support
Messages
4,399
Reaction score
94
Points
48
haha yep. Just the main domain, no 'ftp.blahblah.x10hosting.com', just 'blahblah.x10hosting.com'.
 
Messages
61
Reaction score
0
Points
6
So I thought, now I have connection so uploading files should work. Well apparently I thought wrong...
I get this error when I try to upload a file.

Code:
ftp> put test.txt
200 PORT command successful
425 Could not open data connection to port 33452: Connection timed out
All it uploads is a empty file (so I see test.txt on the ftp, but it's completely empty). Could someone check out if they have this problem as well? This time I'm quite sure it's not something on my side, but that's what I thought last time as well :biggrin: Again any help would be greatly appreciated ;)
 

Sharky

Community Paragon
Community Support
Messages
4,399
Reaction score
94
Points
48
Make sure it's allowed through your firewall. The command prompt FTP client does not support passive file transfers.

ftp> open [host]
Connected to [host].
220---------- Welcome to Pure-FTPd [TLS] ----------
220-You are user number 6 of 50 allowed.
220-Local time is now 08:43. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
User ([host]:(none)): [username]
331 User newslett OK. Password required
Password:
230-User [username] has group access to: [group]
230 OK. Current restricted directory is /
ftp> put sharky.txt
200 PORT command successful
150 Connecting to port 51858
226-File successfully transferred
226 0.444 seconds (measured here), 96.87 bytes per second
ftp: 43 bytes sent in 0.29Seconds 0.15Kbytes/sec.
ftp> disconnect
221-Goodbye. You uploaded 1 and downloaded 0 kbytes.
221 Logout.

Could try as this guy suggests: http://blogs.msdn.com/robert_mcmurr...it-freely-command-line-secure-ftp-client.aspx
 
Messages
61
Reaction score
0
Points
6
Well apparently my firewall does allow me to sign in, but not to transfer files xD If I turn my firewall off it works fine.
Now I've got to figure out how to allow it through my firewall. I don't know why it doesn't work actually as my firewall says it's not blocking anything (clearly it's lying xD). I guess I'll contact the people that made my firewall to ask them how I can let the ftp through.
Thanks again Sharky ;) Firewalls and networking aren't really my strength, it's always a bit vague to me.
 

Sharky

Community Paragon
Community Support
Messages
4,399
Reaction score
94
Points
48
I just use the firewall that is on my router, and the Windows firewall. Does the job.
 
Messages
61
Reaction score
0
Points
6
Well I posted on the Comodo forums and I'm quite sure it's something in their firewall, so I'm trying to figure out what that is with the help of one of the members there. He also suggested using passive ftp first, but that doesn't work, so now we're trying all sorts of other things to find the cause and/or solution. I hope the guy at Comodo can figure out what's wrong, otherwise I have to switch to another firewall...
Anyway thanks for the help guys ;)
 

Sharky

Community Paragon
Community Support
Messages
4,399
Reaction score
94
Points
48
Opening port 21 and... 20, I think, should fix this issue. There's information in the help files how to do that.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
Outgoing to port 21 and incoming from port 20. If the client is behind a NAT, you'd also need to work out some form of port forwarding.

@cyberneticsoldier: does it work if Comodo firewall is disabled?
 

manoogim

New Member
Messages
11
Reaction score
0
Points
0
did you check the ftp logs on the server side ? maybe it is putting you in the wrong remote directory where you don't have priviledge to put a file. instead of sending a file, can you try 'ls' command at the ftp prompt, and see if you recognize the files it shows in the remote dir
 

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
Using the default firewall settings, I could connect and login fine into the servers, but I soon as I typed a command, I received a message from windows firewall stating that some features were blocked. Make sure that the program ftp.exe (in System32) has un-restricted access to the net.
 
Status
Not open for further replies.
Top