My name is Ali and I will guide you on how to log in a course-specific account in this tutorial.
- VS Code
First step is to install VS Code. You can download VS Code through this link VSCode.
- Remote Connecting
Second you are going to connect to a remote system using SSH. If you are using a Windows you need to install openSSH.
-
Look up your course-specifc account using this Link.
-
Open a terminal in VSCode and type the following command:
ssh [email protected]
Note) replace the "zz" with your course-specifc user.
- Enter yes when asked:
Are you sure you want to continue connecting (yes/no/[fingerprint])?
- Enter your password and you should be logged in!
- Commands
Next you are going to try running some commands. Start by typing ls in your terminal, this should list all the files available.
You can find more commands to test on Canvas Modules.
- SCP
Next your are going to move files with SCP. SCP allows you to copy file(s) from your computer to a remote computer.
- In your terminal, type:
scp file.java [email protected]:~/
Note) replace file.java with a file that you create, compile and run.
-
Enter your password. (Same as the one you used for SSH)
-
Then log in into ieng with SSH again and type ls in your terminal. You should be able to see the file in your home directory
- SSH Key
Now you are going to set up SSH Key. This will allow you to login using keys instead of having to type your password everytime you login to ieng with SSH.
-
On your computer, type ssh-keygen in the terminal
-
Enter:
/Users/user-name/.ssh/id_rsa
Note) Change "user-name" with your own.
Tip) Use the image as a reference
-
Enter passphrase (empty for no passphrase)
-
Now if your try to login with ieng with SSH, you should be able to without entering your password!
- Remote Running
Finally you are going to learn how to optimize remote running.
- You can write command in quotes at the end of SSH i.e) ssh [email protected] "ls"
Note) This command will login in a list the home directory on the remote server directly
- You can run multiple commands using semicolon ;
I.e) cp WhereAmI.java OtherMain.java; javac OtherMain.java;
Contragulations on completing the tutorial!
If you have any questions feel free to come to office hours or tutor hours for help.
Good Luck!