cse15l-lab-reports

Week 1 – Remote Access and the Filesystem

🌟Part 1: Installing VScode Go to VScode’s website and download it.

It only works on Windows, OSX, and linux. (If you only have tablet or non of those system’s computer, don’t download it, it won’t work.) image

🌟Part 2: Remotely Connecting Many CSE courses use course-specific account. You can look up your course-specific account over here

It’s initial password is your AD password, and we will need to change it.

For student who are on windows: Install OpenSSH on here

open a terminal on VSCode and login to the account. it should look like this, but replace zz with your specific account.

$ ssh cs15lfa22zz@ieng6.ucsd.edu

For people who are the first time connected to this server, it will show up a question: Are you sure you want to continue connecting (yes/no/[fingerprint])?

Just type yes and enter. After login sucessfully, it would look like this: image

🌟Part 3: Trying Some Commands

Now we’re on the remote computer. Try to run some coomands. image

We can log out the server by two ways: Ctrl-D or using command “exit”

🌟Part 4: Moving Files with scp

then compile and run it by the follwing:

javac WhereAmI.java
java WhereAmI

Sometime we are now on the right directory yet, just use the command

cd /direction of the file/ (don't include the file)

scp WhereAmI.java cs15lfa22zz@ieng6.ucsd.edu:~/

Then it will ask you your password. After you entering the correct password, the file will be on the remote computer.

image

🌟Part 5: Setting an SSH Key

Enter /Users/joe/.ssh/id_rsa

Then it will shows:

Enter passphrase (empty for no passphrase): 

Press enter here, don’t write anything.

Enter same passphrase again: enter again.

After all these steps, now you no need to enter password to login into the remote computer. image

🌟Part 6: Optimizing Remote Running

  1. We can add command in quotes at the end of an ssh to directly run it on the remote computer, then exit.
    $ ssh cs15lfa22zz@ieng6.ucsd.edu "ls"
    

    image

  2. We can also use semicolons to run multiple commands on the same line. $ javac WhereAmI.java; java WhereAmI image