Skip to content

Latest commit

 

History

History
117 lines (75 loc) · 3.44 KB

Report1.md

File metadata and controls

117 lines (75 loc) · 3.44 KB

ieng6 login tutorial

Installing VScode

  1. Search for VSCode on any search engines.
  2. Download and setup VSCode. Link here

The front page of VSCode when successfully setted up

vscode


Remotely Connecting

  1. Open a new terminal in VSCode
  2. enter command(xx means the unique characters of yours)
  1. enter password after resetting to connect to server

This image shows what happens after your are successfully connected to the server.

login


Trying Some Commands


Some examples

try some commands


Moving Files with scp

  1. Copy this code and create a new local file in your computer
class WhereAmI {
  public static void main(String[] args) {
    System.out.println(System.getProperty("os.name"));
    System.out.println(System.getProperty("user.name"));
    System.out.println(System.getProperty("user.home"));
    System.out.println(System.getProperty("user.dir"));
  }
}
  1. Run this command in the terminal(xx means the unique characters of yours):
scp WhereAmI.java [email protected]:~/
  1. Enter the password
  2. Log into ieng6 with ssh again. Use ls to check if the file is in the home directory.

Here is the whole process of using scp and ssh

copy file


Setting an SSH Key

  1. Use the command ssh-keygen to generate a key. (Use ssh-keygen -t ed25519 instead if you are using windows system)
  2. Then follow this process:
$ ssh [email protected]
<Enter Password>
# now on server
$ mkdir .ssh
$ <logout>
# back on client
$ scp /Users/<user-name>/.ssh/id_rsa.pub [email protected]:~/.ssh/authorized_keys
# You use your username and the path you saw in the command above
  1. Then you can login the server without password using ssh or scp.

This is how loging in looks like if the key setup is successful

without pass


Optimizing Remote Running

To increase the speed of uploading your edits of local file to the server, you can do these things:

  1. You can write the command in quotes at the end of your ssh command to directly run it on the remote server.
  2. You can write several commands in the same line
  3. You can use up arrow to recall the last command you run.

Combine them together, you are able to directly run the new edition of the WhereAmI.java file on the server in one line. You can update the file and run the file in two lines.


The image of running the file in one line

running WAI