This tutorial covers the use of the scp
("secure copy") command, which should allow you to transfer files from EWS Linux to personal machines and vice versa.
For a graphical equivalent to the following tutorial, see links available at: https://answers.uillinois.edu/illinois.engineering/81693
Some of them may require you to download specific software.
Find the path to the file that you want to transfer, on the computer that it’s currently located on (“source”). Make a note of this path.
Example: the file is called bar.txt
, and is located in folder foo
, which is on the computer desktop.
Mac example path: /Users/<username>/Desktop/foo/
Windows example: C:\Users\<username>\Desktop\foo\
EWS Linux example: ~/Desktop/foo/
Tip: The pwd
command shows the path of the current working directory in a terminal window in Mac, Linux, and Windows Powershell. The Windows Command Prompt equivalent is cd
.
Tip: If you're having issues finding the path on a Windows computer, here is a quick tutorial from wikiHow.
Find the path that you want the file to end up in on the computer you’re going to copy the file to (“destination”). Make a note of this path.
Open a terminal (Linux, Mac) or command prompt or Powershell (Windows) window on your personal machine.
Type the scp
command as described below.
scp <source path>/<filename> <netid>@linux.ews.illinois.edu:<destination path>
Examples:
Windows:
scp C:/Users/Jane/Desktop/foo/bar.txt jdoe2@linux.ews.illinois.edu:~/Desktop/
Mac:
scp /Users/Jane/Desktop/foo/bar.txt jdoe2@linux.ews.illinois.edu:~/Desktop/
scp <netid>@linux.ews.illinois.edu:<source path>/<filename> <destination path>
Examples:
Windows:
scp jdoe2@linux.ews.illinois.edu:~/Desktop/foo/bar.txt C:/Users/Jane/
Mac:
scp jdoe2@linux.ews.illinois.edu:~/Desktop/foo/bar.txt /Users/Jane/Desktop
Tip: Windows machines seem to have permissions issues if you try to copy to C:\Users\
directly. Try C:\Users\<username>\
instead.
Tip: To copy an entire folder, use scp -r <source> <destination>
(add the recursive flag) .
Tip: An alternative way to indicate the current working directory is .
. So scp <source> .
copies to the current working directory.
Hit enter, if you haven’t already done so.
If this is the first time you’ve done this, you’ll likely see the following warning:
The authenticity of host 'linux.ews.illinois.edu, 128.174.11…)' (ECDSA) can’t be established. ECDSA key
fingerprint is [long string of characters]. Are you sure you want to continue connecting (yes/no)?
Type yes and hit enter.
When prompted by EWS to type your password, do so (you will not see the characters as you type), and hit enter.
You will likely see the following warning:
stdin: is not a tty
Ignore it.
If successful, you should see something like:
bar.txt 100% 74 10KB/s 00:00
and the file should now exist in the destination path.
No such file or directory
Something in the paths is wrong. Double-check the following:
source and destination paths are in the correct place in the command
source and destination paths are correct
file is associated with the correct path
on Macs, make sure that any / at the beginning of the path hasn't been omitted
Permission denied
On Windows, you may be trying to add the file in a directory (folder) that you don't have permission to. Try using a path to a folder you do have access to, like your desktop.
For example: C:\Users\<username>\Desktop