Moving files from EWS Linux to personal machines

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.

Steps

  1. 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.

  2. 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.

  3. Open a terminal (Linux, Mac) or command prompt or Powershell (Windows) window on your personal machine.

  4. Type the scp command as described below.

    To move files from personal machine to EWS Linux:

     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/

    To move files from EWS Linux to personal machine:

     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.

  5. Hit enter, if you haven’t already done so.

  6. 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.

  7. When prompted by EWS to type your password, do so (you will not see the characters as you type), and hit enter.

  8. You will likely see the following warning:

     stdin: is not a tty

    Ignore it.

  9. 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.

Troubleshooting

No such file or directory

Something in the paths is wrong. Double-check the following:

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

All rights reserved by ECE220@UIUC. Design by Asher Mai & Ivan Abraham.
Last modified: December 28, 2023. Website built with Franklin.jl and the Julia programming language.