Remote Access Mac SCP
Transfer files between Mac and Emory server: scp (secure copy)
- Open a command window on your Mac
cd(change directory) to your project directory on your Mac where you want to save the downloaded file.- Suppose you want to upload the file to your
cs171on Emory lab-machines....(Change the folder name if you want to upload your file to a different folder)
- Execute this command to upload the file
fileNameon your Mac to thecs171project folder on Emory lab-machines:scp fileName yourNetID@lab0z.mathcs.emory.edu:cs171
You can replace
cs171with a different folder name if desired.Example: this command will upload the program
proj1.javafrom your Mac to Emory:scp proj1.java yourNetID@lab0z.mathcs.emory.edu:cs171
- Type in your Emory NetID password when prompted
- Open a command window on your Mac
cd(change directory) to your project directory on your Mac that contains the file that you want to upload.- Suppose you want to upload the file
fileNameinside yourcs171/pj1folder on Emory lab-machines....(Change the filename and folder name if you want to download a different file or from a different folder)
- Execute this command to download the file
fileNamein thecs171/pj1project folder on Emory lab-machines: to your Mac:scp yourNetID@lab0z.mathcs.emory.edu:cs171/pj1/fileName .Make sure you type the period at the end of the command ("." means the currect folder on your Mac).
Example: this command will upload the program
proj1.javain thecs171/pj1folder on Emory to your Mac:scp yourNetID@lab0z.mathcs.emory.edu:cs171/pj1/proj1.java . - Type in your Emory NetID password when prompted
Where is my downloaded file:
The file transfered will reside in the directory when you CD-ed into in the command window. (on the Mac)
Warning when you downloading a file from Emory lab-machine:
The Mac has the nasty habit of renaming a transfered file.
So you may find your transfered file has a .txt suffix aftertransfering it to your Mac.
If this happens, you need to:
- Open a command window on your Mac
cdto the folder where the file resides- Use the
mvcommand:mv oldFileName newFileName
to rename the file back to its original name....