DirectNET

Data Center Management Solutions including UPS Systems, Data Center Cooling, KVM over IP & IP Power Strips, Server Racks and Server Rack accessories; KVM Switches and KVM Extenders; Rackmount Monitors and Rackmount Keyboards.


NAVIGATION
Home
Store
INSIDE MAC
Television Shows
Broadcast Shows
Daily News Shows
Special Shows
EVENTS
DAILY TIPS
Design
Mac OS X
Mac OS X UNIX
COMMUNITY
Surveys
NEWS
Current
Press
Archive
FEATURES
Editorial
Dr. Mac
Reviews
Reader Reports
RESOURCES
FAQ
Documentation
Learning Center
MAN pages
Glossary
Tutorials
Tips
Links

OUR PARTNERS

OSXFAQ Reader Tips 

Move Files From One Computer To Another VIA "scp" Secure Copy Protocol - In Mac OS X.

OSXFAQ Reader Tip By James Kelly

Have you ever been on say machine A and want to securely move a file to another computer? Well Secure Copy Protocol is part of OpenSSH already on your box. This hint presumes you have a username and password on the target box and you are already logged onto the source box.

Source_Box---------scp------------->Target_box

Open terminal and do:

vi copyhome

then type the following into the terminal window

#Useage:

#move this script someplace in your path

#like /usr/sbin by doing:

#sudo mv copyhomse /usr/sbin/copyhome

#rehash

#then cd to the directory where the

#directory where the file you want to

#move lives then do:

#scp filename ipOFtargetBox

#do:

#scp

#!/bin/sh

scp $1 targetboxUsername@"$2":/Users/targetboxHomeDirectory/.

!!!!note don't forget the period at the end of the last line of this script.

Now do:

chmod 700 copyhome

Here is how you use the script:

cd to the directory of the file you want to send then do:

copyhome filename targetbox_IP_address

Enjoy :-)

If you would like to see your tip here send it to us at contribute@osxfaq.com, You could be famous to!!

Copyright © 2000-2010 Inside Mac Media, Inc. All rights reserved.
Apple assumes no responsibility with regard to the selection, performance, or use of the products or services. All understandings, agreements, or warranties, if any, take place directly between the vendors and prospective users.
Apple, the Apple logo, Mac, PowerMac G4, PowerMac G5, Xserve, Xserve RAID, PowerBook, iBook, Airport, AirPort Extreme, iMac, eMac, iLife, iMovie, iCal, iPhoto, iTunes, QuickTime, FireWire, iPod, iSight, AppleWorks, Macintosh, Jaguar, Panther, Mac OS, Mac OS X and Mac OS X Server are trademarks of Apple Computer, Inc.