0

I'm trying to download a file from a Linux server via FTP from Windows command line. I've successfully downloaded the file with FileZilla (same server, same file), but I want to do it in cmd.exe.

I've tried two things:

$ ftp 10.58.83.2  
ftp> cd /home  
Not connected.  
ftp>  


$ ftp  
ftp> open 10.58.83.2  
ftp> cd /home  
Not connected.  
ftp>  

Why am I not prompted to enter user creds?

== EDIT ==
I tried to specify the port

$ ftp
ftp> open 10.58.83.2 22
Connected to 10.58.83.2.
SSH-2.0-OpenSSH_4.3
<Waits for a minute or so>
Connection closed by remote host.
ftp>  

After it says I'm connected it just waits a minute and then closes the connection. I have succeeded with FileZilla so it should be possible, right?

6
  • The server is either using a different port for ftp or you have the wrong address.
    – Jason H
    May 23, 2013 at 14:20
  • 1
    ftp is port 21, not 22.
    – Flup
    May 23, 2013 at 14:48
  • I can connect with FileZilla on port 22. Not on port 21 - it says Connection refused. But when I connect on port 22 with FileZilla it uses SFTP. May 23, 2013 at 14:55
  • 1
    Filezilla supports sftp - it's actually file transfer over ssh, and doesn't require an ftp server. There's probably something wrong or not running with your FTP server - most linux distrobutions require that you specifically install and configure a ftp server in order to use ftp. Mar 18, 2016 at 23:56
  • BTW the command to connect to a ssh server is called "sftp" - there's a version for windows called PSFTP if you want a cli sftp program. Mar 18, 2016 at 23:58

2 Answers 2

0

try using ftp command: user your_ftp_user then password after enter(i use it that way with script file, password in new line), or user your_ftp_user thats_user_password but I haven't tried password in same line as user.

and to connect to specific port you might have to use ftp command open address port as you did, it won't work directly using ftp address:port - didn't work for me.

0

I had the EXACT same experience trying to ftp to an as400. Turns out the ftp job wasn't running on the server. Just has to start it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .