Commit 202a01e9 authored by ekirci's avatar ekirci
Browse files

add remote-ssh instructions for VSCode

parent 4df2ec4b
# Advanced Topics in Communication Networks 2020 # Advanced Topics in Communication Networks 2020
Welcome to the Advanced Topics in Communication Networks Repository! Welcome to the Advanced Topics in Communication Networks Repository!
Here you will find the weekly exercises along with the instructions on how to run them in a virtual environement. Here you will find the weekly exercises and instructions on how to run these exercises in a virtual environment.
## How to start? ## How to start?
To make your life simpler, we give to each of you access to one VM where all the necessary tools and software are pre-installed. To make your life easier, we provide each of you with access to one VM where all the necessary tools and software are pre-installed.
### Access your own VM ### Access your own VM
To access your VM, you willl SSH. SSH is a UNIX based command interface and protocol for securely getting access To access your VM, you will use SSH. SSH is a UNIX based command-line interface and protocol for securely getting access
to a remote computer. It is widely used by system administrators to control network devices to a remote computer. It is widely used by system administrators to control network devices
and servers remotely. An SSH client is available by default on any Linux and MAC installation and servers remotely. An SSH client is available by default on any Linux and MAC installation
through the Terminal application. For Windows user, a good and free SSH client is [PuTTY](https://www.chiark.greenend.org.uk/~sgtatham/putty/). through the Terminal application. For Windows 10 users, there is SSH functionality avaliable in the Command Prompt. For other Windows users, a good and free SSH client is [PuTTY](https://www.chiark.greenend.org.uk/~sgtatham/putty/).
Once you have installed a SSH client, use the following command to connect yourself to your Once you have installed an SSH client, use the following command to connect yourself to your
VM: VM:
``` ```
...@@ -28,7 +28,7 @@ ssh -p 2007 p4@moonshine.ethz.ch ...@@ -28,7 +28,7 @@ ssh -p 2007 p4@moonshine.ethz.ch
``` ```
If you cannot connect to your VM, If you cannot connect to your VM,
please report it immediately during the exercise session or in moodle. If you want to simplify please report it immediately during the exercise session or in [Moodle](https://moodle-app2.let.ethz.ch/mod/forum/view.php?f=22500). If you want to simplify
the access to your VM (optional), please use SSH key authentication, but do not change your the access to your VM (optional), please use SSH key authentication, but do not change your
password. If you want to download an entire directory (e.g. the configs directory) from your password. If you want to download an entire directory (e.g. the configs directory) from your
VM to the current directory of your own machine, you can use scp: VM to the current directory of your own machine, you can use scp:
...@@ -40,9 +40,25 @@ VM to the current directory of your own machine, you can use scp: ...@@ -40,9 +40,25 @@ VM to the current directory of your own machine, you can use scp:
where X = 2000 + group number. On Windows, you can use WinSCP7 to do that. Note the where X = 2000 + group number. On Windows, you can use WinSCP7 to do that. Note the
dot at the end of the command and the capitalized P. dot at the end of the command and the capitalized P.
### Remote Development
We need to be able to open and edit remote files in our local code editor to have a smooth development cycle. This way, we can work with our code locally, and execute it remotely without any friction. Below, we explain how to achieve this for Visual Studio Code as an example.
1) Download Visual Studio Code.
2) Access VS Code, in the left-side dock enter `Extensions` menu.
3) Install `Remote - SSH` extension.
4) In the pop-up prompt: enter your SSH credentials as you did for the VM access.
5) Your "Remote Directory" should appear in the Explorer.
6) [Optional] Go to Extensions menu again, and install `P4 Language Extension` in your remote machine for highlights and syntax check.
For VS Code, you can find further information [here](https://code.visualstudio.com/docs/remote/ssh).
If you are already familiar with remote development, continue with your favourite code editor.
#### VM Credentials #### VM Credentials
During the lecture, we will two types of exercises. First, we will have p4-based exercises. Then we will have exercises based on the mini-Internet. During the lecture, we will two types of exercises. First, we will have p4-based exercises. Then, we will have exercises based on the mini-Internet.
We will use two different users for the two types of exercises. For the p4-based exercises please use the login `p4`, and for the mini-Internet-based exercises please use the login `mini_internet`. We will use two different users for the two types of exercises. For the p4-based exercises please use the login `p4`, and for the mini-Internet-based exercises please use the login `mini_internet`.
We have sent you your password by email. It is the same for both logins. If you have not received your password please let us know immediately. We have sent you your password by email. It is the same for both logins. If you have not received your password please let us know immediately.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment