LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   FTP command line (https://www.linuxquestions.org/questions/linux-general-1/ftp-command-line-402718/)

tommytomato 01-12-2006 10:03 PM

FTP command line
 
Hi all

I've been reading about FTP in the man pages and now I'm trying to conntect to an out side server.

This is what I'm typing in below
Code:

ftp open 202.xx.xxx.xxx /user:my_user /password:my_password
and I keep getting this below, I've tried a few diferent way's to get it, but it wont let me conntect :scratch:
Code:

ftp host-name [port]
I cant seem to conntect like that, I can the other way.

Code:

ftp>open 202.xx.xxx.xxx
Connected to 202.xx.xxx.xxx
220 Microsoft FTP Service
500 'AUTH GSSAPI': command not understood
500 'AUTH KERBEROS_V4': command not understood
KERBEROS_V4 rejected as an authentication type
Name (202.xx.xxx.xxx:root): my_user
331 Password required for my_user.
Password:
230 User my_user logged in.
Remote system type is Windows_NT.

Trying to get the login right so I can create a .sh script for logging into a remote server to upload a couple of file's every day.

TT

pixellany 01-12-2006 10:32 PM

Not completely sure what the question is...

The syntax for ftp is typically:
ftp
open <ip or domain name>
login junk
OR:
ftp <ip or domain name>
login junk

"ftp open ..." will not make it happy....;)

tommytomato 01-12-2006 10:35 PM

Opps

I was wondering why I cant connect as to I keep geting this
ftp host-name [port]

not sure where to put the port number 202.xx.xxx.xxx:21:confused:

status says I'm not conntected.

TT

trickykid 01-13-2006 04:33 AM

ftp open 202.xx.xxx.xxx /user:my_user /password:my_password 21

The [port] indicates the port number comes at the end as it's giving you the usage in that output error.

timmeke 01-13-2006 04:55 AM

As pixellany said, the syntax is either:
shell> ftp
ftp> open "IP_or_Hostname"
if login failed, use "user" command to try again while connection is still open
ftp> use_other_FTP_commands
ftp> quit

Or:
shell> ftp IP_or_Host
=> login
ftp> again_your_ftp_commands

where "shell>" indicates something to type at your shell's prompt and "ftp>" indicates the prompt of the ftp command (where you can type in FTP commands).

shell> ftp open some_host
may fail altogether, since "ftp" may mistakingly interprete "open" as target host's name.

For automatic login, try looking at "man .netrc".

As for the ports, don't worry too much. ftp will use the default ports, depending on whether you're
doing an active ftp or a passive one (pasv command in ftp, I think).
I don't think you need to explicitly mention the port number (I've never done that myself and I use ftp
all the time), unless you need a "non-standard" port.

But trickykid seems to have a nice idea too.

pixellany 01-13-2006 08:57 AM

Quote:

Originally Posted by tommytomato
Opps

I was wondering why I cant connect as to I keep geting this
ftp host-name [port]

TT

You get this if you use the wrong syntax. FTP is telling you that it expected a host-name
[port] means that you have the OPTION of also specifying a port. Normally, you do not need to.

You need either a valid ftp IP, or a valid domain name. With this, simply type "ftp <IP or domain name>


All times are GMT -5. The time now is 02:57 PM.