Home | Hardware | Internet News |Web Hosting |IT Management |Network Storage
LinuxPlanet
Search 
  Power Search | Tips 

 Front Door
 Discussion
 LinuxEngine
 Opinions
 Reports
 Reviews
 Tutorials
 News
 Technology Jobs

 Browse by subject.
Free Newsletter

Linux Planet
Linux Today
More Free Newsletters

Be a Commerce Partner


















internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

Print this article
Email this article

   LinuxPlanet / Tutorials



Moving Files In Linux
sftp

Dee-Ann LeBlanc
Thursday, May 22, 2003 09:49:23 AM

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:

sftp dee@egg.example2.com

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.

Next: Wrapping Up »

Skip Ahead

1 The Low Security Family
2 lftp
3 rcp
4 rsync
5 wget
6 The High Security Family
7 scp
8 sftp
9 Wrapping Up





Linux is a trademark of Linus Torvalds.


internet.com home | search | help! | about us

Jupiter Online Media

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers