LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 08-26-2004, 12:55 PM   #1
imagirlgeek
LQ Newbie
 
Registered: Aug 2004
Posts: 8

Rep: Reputation: 0
How can I connect to my local machine using FTP at the command line?


At the risk of embarrassing myself, I have a very simple question.

I am trying to connect to my local machine using FTP? This is possible, right? How can I determine my machine name's correct name, if using the syntax:

ftp> open machine

I tried going to the "System" area of the control panel but the name of the machine given there is not working.

Thank you very much.
 
Old 08-26-2004, 01:25 PM   #2
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 46
if you don't have a nameserver or your hosts file isn't set up with names, you can use the IP. so for example it might look something like this:

Code:
[8] sero:~ $ lftp 192.168.0.20
lftp moe:~> user sero
Password: 
lftp sero@moe:~> ls
drwxr-xr-x   3 jbella   ftp          4096 Feb  3  2004 jbella
drwxr-xr-x   8 jeff     ftp          4096 Aug 26 03:55 jeff
drwxr-xr-x   3 sero     ftp          4096 Aug 20 03:03 sero
lftp sero@moe:/>

Last edited by synaptical; 08-26-2004 at 01:28 PM.
 
Old 08-26-2004, 01:33 PM   #3
dsegel
Member
 
Registered: Aug 2004
Location: Davis, California
Distribution: Gentoo, always Gentoo.
Posts: 159

Rep: Reputation: 30
This of course assumes you have an ftp server daemon running on your system.

When you say "connect to my local machine do you mean you are trying to ftp to the same sytem you are running the ftp client on? What exactly are you trying to accomplish? There are other ways of copying files around a network, such as scp, that may work better for you.
 
Old 08-26-2004, 01:35 PM   #4
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 46
Quote:
Originally posted by dsegel
This of course assumes you have an ftp server daemon running on your system.
that would help!
 
Old 08-26-2004, 01:36 PM   #5
imagirlgeek
LQ Newbie
 
Registered: Aug 2004
Posts: 8

Original Poster
Rep: Reputation: 0
What I'm actually trying to do is FTP files from a remote server, to my local machine.

I tried typing in lftp and it didn't recognize the command.

So I typed in ftp>

open my.ip.address. (by this I mean the IP address of my machine)

and I got the message "Connection refused".

I'm sorry, I'm just a little confused. thanks
 
Old 08-26-2004, 02:01 PM   #6
dsegel
Member
 
Registered: Aug 2004
Location: Davis, California
Distribution: Gentoo, always Gentoo.
Posts: 159

Rep: Reputation: 30
OK, if you're logged into your local machine and you want to initiate an ftp connection to a remote server you type:

ftp remote.ip.address

or

ftp remote.machine.name

Assuming you get connected you can then cd to whatever directory you want to and start issuing get/mget commands to retireve the files you want.
 
Old 08-26-2004, 02:13 PM   #7
imagirlgeek
LQ Newbie
 
Registered: Aug 2004
Posts: 8

Original Poster
Rep: Reputation: 0
I really appreciate this.

I should have mentioned - to be specific- that I am using Putty, and I am logged in as root, to the remote machine/server. I want to pull files from the remote machine, to my local machine, the actual one that I am working on right now.

So I typed:

ftp remoteservername

and got connected no problem.

Then I tried to cd to a directory, and it prompted me for a password. I tried using the root password, but it said login failed.

I'm so sorry if I am confusing you. I just want to take files from the remote server and put them on my machine here. I might be barking up the wrong tree with this.
 
Old 08-26-2004, 02:20 PM   #8
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
here's whayt you'll want to do:

ftp
open remote.machine.ip
user USERNAME
Password
cd DIR
get FILENAME

for additional commands, type help
 
Old 08-26-2004, 02:26 PM   #9
dsegel
Member
 
Registered: Aug 2004
Location: Davis, California
Distribution: Gentoo, always Gentoo.
Posts: 159

Rep: Reputation: 30
Quote:
Originally posted by imagirlgeek
[B]I should have mentioned - to be specific- that I am using Putty, and I am logged in as root, to the remote machine/server. I want to pull files from the remote machine, to my local machine, the actual one that I am working on right now.
OK, that's a bit strange. Let's clarify what's going on here. Let me know if this is all true:

1. You are logged onto a local linux system

2. You are trying to retrieve files off of a remote server

If those two statements are true, forget the Putty connection to the remote system. You will use ftp to connect and retrieve the files; you don't need to be logged into it to make this work.

Quote:
So I typed:

ftp remoteservername

and got connected no problem.

Then I tried to cd to a directory, and it prompted me for a password. I tried using the root password, but it said login failed.
You mean you got an ftp connection established without it asking you for any kind of Name or Password? That sounds fishy.
 
Old 08-26-2004, 02:35 PM   #10
imagirlgeek
LQ Newbie
 
Registered: Aug 2004
Posts: 8

Original Poster
Rep: Reputation: 0
I am logged into my local machine (my desktop computer), but I am logged into the remote server as root, using Putty.

The basis for me trying this is that I've been trying to download enormous .gz files from the remote server onto our network drive (G, and it literally takes hours just for one file to download. I figured trying this via the command line might quicken the process a little bit.
 
Old 08-26-2004, 02:37 PM   #11
imagirlgeek
LQ Newbie
 
Registered: Aug 2004
Posts: 8

Original Poster
Rep: Reputation: 0
Oops, I mean downloading the files via <b>WinSCP3</b> was taking hours.
 
Old 08-26-2004, 02:50 PM   #12
dsegel
Member
 
Registered: Aug 2004
Location: Davis, California
Distribution: Gentoo, always Gentoo.
Posts: 159

Rep: Reputation: 30
Quote:
Originally posted by imagirlgeek
I am logged into my local machine (my desktop computer), but I am logged into the remote server as root, using Putty.

The basis for me trying this is that I've been trying to download enormous .gz files from the remote server onto our network drive (G, and it literally takes hours just for one file to download. I figured trying this via the command line might quicken the process a little bit.
OK, I think I understand this now: you're on a Windows PC using PuTTY to establish a secure ssh tunnel to the remote server. You are currently using WinScp to copy files back and forth.

A few points to consider:

1. ftp is not a secure protocol. If you need your files to be safe as they traverse the network (Internet?) between the remote system and your PC then don't use ftp. It is possible to make ftp work over the ssh tunnel, but it requires configuration that I'm not familiar with.

2. Command line ftp is not likely to be a *lot* faster than WinScp. Straight ftp won't be encrypting anything, but that probably isn't slowing you down much unless the processors on the two systems are really slow or overloaded.

Can you establish a direct (non-ssh tunnel) connection to the remote server? The ftp commands should be the same if you run them from a DOS command window. You don't need to be logged into the remote system at all to establish an ftp connection to it.

Last edited by dsegel; 08-26-2004 at 02:52 PM.
 
Old 08-26-2004, 02:57 PM   #13
imagirlgeek
LQ Newbie
 
Registered: Aug 2004
Posts: 8

Original Poster
Rep: Reputation: 0
Yes, you're on target .... thank you for the advice. As long as I probably won't be gaining much speed ftp-ing over the command line, I'm not going to research it further at this point. I am going to try a few other things to make sure I've got the most efficient connection.

Thank you SO much for your time and help, Dsegel!
 
  


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
connect to internet using command line ic_torres Slackware 5 12-05-2005 04:35 AM
what is different with Ftp From browser and Ftp from command line zahra79 Linux - Networking 2 06-22-2005 03:26 AM
Samba: can't connect to my local linux machine but can connect to windows. Royle Linux - Networking 3 01-18-2005 05:32 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


All times are GMT -5. The time now is 05:00 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