LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-12-2006, 10:03 PM   #1
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 12.04 - Server 12.04.4 LTS
Posts: 935

Rep: Reputation: 32
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
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
 
Old 01-12-2006, 10:32 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
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....

Last edited by pixellany; 01-12-2006 at 10:35 PM.
 
Old 01-12-2006, 10:35 PM   #3
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 12.04 - Server 12.04.4 LTS
Posts: 935

Original Poster
Rep: Reputation: 32
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

status says I'm not conntected.

TT
 
Old 01-13-2006, 04:33 AM   #4
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
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.
 
Old 01-13-2006, 04:55 AM   #5
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
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.
 
Old 01-13-2006, 08:57 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
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>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
what is different with Ftp From browser and Ftp from command line zahra79 Linux - Networking 2 06-22-2005 03:26 AM
Best way to upload (FTP) something via the command line... obelxi Linux - Networking 2 03-17-2005 06:15 PM
Command Line FTP erikcw Fedora 3 10-12-2004 09:44 AM
ftp command line acrors Fedora 3 10-02-2004 04:55 AM
command line ftp client keevitaja Linux - Software 2 09-12-2002 04:28 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration