Moving Files In Linux - page 8
The Low Security Family
sftp is an interactive tool that works over an ssh connection, mirroring the ftp program's functionalityï¿½and is in fact a nice front end to scp. You won't be using this client for anonymous downloads, but if you need to move data or other confidential information between machines, this is an excellent tool to choose. Once you've mastered the scp command you'll find sftp simple to use, or vice versa. They share many of the same flags and mostly the same syntax.
Let's say that I want to FTP copies of some vital trade secrets from my office machine (user d.leblanc at work1.example.com) to my home machine (user dee at egg.example2.com)--okay, so let's not discuss why I'd want to be crazy enough to risk this in the first place--without someone being able to sniff out the data being passed along or any passwords along the way. Once I have ssh set up for a proper connection on both machines, I can open the connection using:
After being challenged for the password for user "dee," which is transmitted in a tunnel through the secure shell, I'm in and have the sftp prompt. Now I can use any of the commands in the sftp man page's INTERACTIVE COMMANDS section. Such a session might look like the following:
sftp> mkdir StealMe sftp> cd StealMe sftp> put formulas/secret/* Uploading formulas/secret/worldpeace to /home/dee/StealMe/worldpeace Uploading formulas/secret/worldpeace to /home/dee/StealMe/worldpeace Uploading formulas/secret/baldcure to /home/dee/StealMe/baldcure Uploading formulas/secret/slimmer to /home/dee/StealMe/slimmer Uploading formulas/secret/senseofhumor to /home/dee/StealMe/senseofhumor sftp>
So think of sftp as the more advanced, interactive cousin of scp.
Sponsored by BlackBerry
BlackBerry® Enterprise Server Express enables businesses of any size to quickly and easily get started with the BlackBerry solution. It provides advanced BlackBerry smartphone features with no additional software or user license fees, and works with any Internet-enabled BlackBerry data plan or a BlackBerry enterprise data plan. Download now!
- 1Linux Top 3: Linus Lashes out, Linux 3.14 Gets PIE and Ubuntu One is Done.
- 2Linux Top 3: Ubuntu 14.04, Debian Gives Squeeze More Life and Red Hat Goes Atomic
- 3Linux Top 3: CoreOS, Oracle Enterprise Linux 7 and Ubuntu 14.10
- 4Linux Top 3: Debian Dumps SPARC, Ubuntu Takes Over Linux 3.13 and the Core Infrastructure Initiative
- 5Linux Top 3: Fedora, Ubuntu and Gluster Lose Community Leaders