Cannot connect to non standard port number with Windows command-line ftp (cmd ftp username not show)

7

2

I have a Windows 7 IIS - FTP Website on my localhost. Its IP is 192.168.2.77:15555,

I can successfully connect to ftp://192.168.2.77:15555/ and get the file list after enter username/password through browser like Chrome.

But when I open cmd, and use ftp 192.168.2.77 or ftp 192.168.2.77:15555, the prompt for username/password does not show (which should show in normal procedure)

It changed to ftp> directly, and if I execute ls -al it tells me I'm not connected:

C:\Users\username>ftp 192.168.2.77:15555
Unknown host 192.168.2.77:15555.
ftp> ls -al
Not connected.
ftp>
C:\Users\username>ftp 192.168.2.77
ftp> ls -al
Not connected.
ftp>

What should I do further to connect to FTP through cmd?

yu yang Jian

Posted 2017-09-08T07:30:56.467

Reputation: 173

Answers

16

There's no way to connect to a non-standard port number from ftp.exe command-line.

You have to use the open command:

C:\Users\username>ftp
ftp> open 192.168.2.77 15555

Martin Prikryl

Posted 2017-09-08T07:30:56.467

Reputation: 13 764