How can I connect to my local machine using FTP at the command line?
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.