Click to See Complete Forum and Search --> : Using ftp from the command line.
chadm1967
11-21-2001, 08:57 AM
Hi all,
I've decided to become more dependent on the command line. So, I decided to start using ftp from the command line instead of a gui ftp client. I download a file like this, for example:
get 175743.gif
It will then place the file in /home/chad. Which, is okay, but I would like it to be placed in a directory like /home/chad/web. What would the command be to accomplish this? I found a great mini-HOWTO on the linuxdoc.org site but this part wasn't that clear.
Thanks for any help you can give.
chadm1967
11-21-2001, 09:41 AM
Well, I figured out how to do the above....
I do have another question, though. Is it possible to download more than 1 file at a time?
Thanks.
deadlock
11-21-2001, 09:42 AM
First off make the /home/chad/web directory, then ftp to the site you want, then at the ftp prompt type lcd /home/chad/web
Icarus
11-21-2001, 09:50 AM
To 'get' multiple files via FTP, you need to use the 'mget' command... :)
I had this problem when I first started using FTP also :rolleyes:
chadm1967
11-21-2001, 10:46 AM
Thanks for the help everyone. That worked.
Xsecrets
11-21-2001, 01:31 PM
also if you are not already using it I would HIGHLY suggest that you use ncftp. it is much nicer and has added functionality.
Ludootje
11-21-2001, 02:08 PM
chad: could you please give me the exact url of the howto you found on linuxdoc?
TIA
bdg1983
11-21-2001, 05:05 PM
You won't believe this, but there's actually a manpage on ftp (man ftp) that explains get, mget, put, lcd, cd and more. Amazing. ;)
X_console
11-22-2001, 06:11 AM
Use sftp instead of ftp. At least that encrypts your session.
Ludootje
11-22-2001, 12:45 PM
Originally posted by X_console:
<STRONG>Use sftp instead of ftp. At least that encrypts your session.</STRONG>
what's sftp?
who cares if the session is encrypted? i mean, that doesn't matters..
yeah well i suppose i'm wrong again :rolleyes:
milanuk
11-22-2001, 03:52 PM
Well, some people care about logging into a machine in plaintext. For instance, I have a shell account w/ panix.com. I can telnet in, and perhaps transfer files through a couple methods (not sure if I could even ftp to my home directory, probably not, but anyway). But to do so would put the password to my account in jeopardy every time I did so. So I use ssh and sftp (ftp over an ssh connection, basically) to keep things secure.
Same thing if you have a webserver account on the internet somewhere, and you want to upload some stuff to it via ftp. Your username and password for that account just went over the wire in plaintext, and anyone who can sniff it could then log in as you and trash your site, w/ you none the wiser until your web page disappeared!! Using sftp, you could do the same thing w/ no fear of being compromised in that manner.
Unfortunately, regular ftp will probably be w/ us for a good bit longer, since people use anonymous ftp all the time, to download patches, iso images, etc. where it doesn't really matter if you are 'secure' or not. Plus a lot of web hosters are still not set up to provide ssh/sftp to their customers. They should be, but they are not(especially the 'free' ones).
HTH,
Monte
stiles
11-22-2001, 04:36 PM
Who can sniff your connection? I guess that would be a relevant question in determining what type of file transfer protocol to use. Typically you have to worry about your ISP, there's upstream provider and the other side of the connection (their ISP and upstream provider). Now think of the bandwidth that moves through your ISP's gateway and their upstream provider. I'm more worried about loose lips and remote exploits in this situation.
Isn't sftp just a front end that mimics ftp but actually uses the scp protocol?
Is anyone aware of how many fewer scp connections can be made on the same hardware as connections over ftp due to the encryption handshake overhead? I know that going from http to https you take about a 20-1 hit. Yep a server that could do 1000 concurrent connections with http will be down to around 50 concurrent connections with https (w/ 128 bit keys). Are the libraries and ciphers that ssh uses similar to ssl? If so I don't see why you wouldn't take the same performance hit. I don't think everybody has the money to handle a large amount of encrypted traffic.
[ 22 November 2001: Message edited by: stiles ]
milanuk
11-22-2001, 04:50 PM
I agree, it largely boils down to what is commonly referred to as 'risk management'. What is the likelyhood that someone is going to be trying to sniff passwords over the path that your data takes from your house to your web host? Probably not good. From inside your college network, or even some corporate networks? Probably a lot better. It's up to the individual to decide how much paranoia is really justified in a given case. Just as long as they don't ***** if they get nailed after using cleartext logins.
Monte
Ludootje
11-26-2001, 12:32 PM
I'm affraid ssh isn't working on my mandrake8.1 box: when i select the option to connect to an irc server with ssh under xchat, it can't connect. Same goes with gabber for the msn agent.
Could anyone give me some ideas of how to fix this?