{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": false,
    "editable": false,
    "nbgrader": {
     "cell_type": "markdown",
     "checksum": "2068147fbdbd61cc7f9cbfa391d6fcb7",
     "grade": false,
     "grade_id": "cell-fdd9aaf71771f5cc",
     "locked": true,
     "schema_version": 3,
     "solution": false,
     "task": false
    }
   },
   "source": [
    "<div style=\"background-color:rgba(100, 160, 200, 0.33);\">\n",
    "\n",
    "<h1>Tutorial 1 - Introduction</h1>\n",
    "\n",
    "<p>\n",
    "Submission process:\n",
    "</p>\n",
    "<ul>\n",
    "<li>Submission deadline is November 5, 14:00 CET (before the lecture) .</li>\n",
    "<li>Commit and push your solution as separate notebook files per subtask via git as <span style=\"font-family: monospace\">./tutorial/tutorial1/tutorial1_2.ipynb</span>. Please take care of the correct subfolder/filename since submission is denied otherwise.</li>\n",
    "<li>During the first lecture after the deadline we will discuss a sample solution in class.</li>\n",
    "<li>Afterwards, you have time until November 10, 16:00 CET (before the lecture) to submit a corrected version of your submission:</li>\n",
    "<ol>\n",
    "  <li>Rework your solution according to our discussion in class.</li>\n",
    "  <li>Commit and push the corrected version as a separate file per subtask via git as <span style=\"font-family: monospace\">./tutorial/tutorial1/tutorial1_2.ipynb</span>. Please take care of the correct filename since submission is denied otherwise.</li>\n",
    "</ol>\n",
    "</ul>\n",
    "\n",
    "<p>\n",
    "Remarks:\n",
    "</p>\n",
    "<ul>\n",
    "<li>Grading is done based on both versions of your submission.</li>\n",
    "<li>If the first submission is missing or contains major flaws a deduction of up to 50% of the achieved points will be applied</li>\n",
    "<li>A sample solution is provided after November 10, 16:00 CET eventually.</li>\n",
    "<li>Do NOT duplicate cells or change the type of cells, otherwise you might receive zero points for your submission</li>\n",
    "<li>\n",
    "Please use <a href=\"mailto:acn@net.cit.tum.de\">acn@net.cit.tum.de</a> for questions regarding lecture, tutorial, and project of ACN.\n",
    "</li>\n",
    "</ul>\n",
    "</div>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": false,
    "editable": false,
    "nbgrader": {
     "cell_type": "markdown",
     "checksum": "6f7c435b17e86ea6a72ffe9d89cf3ccd",
     "grade": false,
     "grade_id": "cell-cf1bf85852242b36",
     "locked": true,
     "points": 0,
     "schema_version": 3,
     "solution": false,
     "task": true
    }
   },
   "source": [
    "<div style=\"background-color:rgba(200, 100, 100, 0.33);\">\n",
    "    <p>This cell is used to verify the structure of the submission </p>\n",
    "    DO NOT DELETE OR CHANGE THIS CELL, otherwise the task will be graded with 0 points\n",
    "    </div>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": false,
    "editable": false,
    "nbgrader": {
     "cell_type": "markdown",
     "checksum": "0c3bbb0c661a85a57ff837f5fef5d678",
     "grade": false,
     "grade_id": "cell-91991fd150d1fbed",
     "locked": true,
     "schema_version": 3,
     "solution": false,
     "task": false
    }
   },
   "source": [
    "<div style=\"background-color:rgba(100, 160, 200, 0.33);\">\n",
    "<h3>Problem 2 SSH and Virtual Machine (VM) Access [3.0 credits]</h3>\n",
    "\n",
    "<p>\n",
    "If you can see this notebook you probably followed directions from the <a href=\"https://acn.net.in.tum.de/exercise/instructions.pdf\">infrastructure introduction</a>.\n",
    "To hand in your answers, please write them down in the prepared cells.\n",
    "</p>\n",
    "\n",
    "</div>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": false,
    "editable": false,
    "nbgrader": {
     "cell_type": "markdown",
     "checksum": "05de608b6f6f6c1b27ea754514a89324",
     "grade": false,
     "grade_id": "cell-833355bb882816ad",
     "locked": true,
     "schema_version": 3,
     "solution": false,
     "task": false
    }
   },
   "source": [
    "<div style=\"background-color:rgba(100, 160, 200, 0.33);\">\n",
    "<p>\n",
    "<b>a) [0.5 credits]</b> What is SSH and what it is being used for?\n",
    "</p>\n",
    "</div>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": false,
    "nbgrader": {
     "cell_type": "markdown",
     "checksum": "5738a25915667972980dcdf920f72560",
     "grade": true,
     "grade_id": "cell-e87707e174502c7e",
     "locked": false,
     "points": 0.5,
     "schema_version": 3,
     "solution": true,
     "task": false
    }
   },
   "source": [
    "YOUR ANSWER HERE"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": false,
    "editable": false,
    "nbgrader": {
     "cell_type": "markdown",
     "checksum": "d272d628434199048c4bf04137947b8a",
     "grade": false,
     "grade_id": "cell-a3a2f87a23e8810b",
     "locked": true,
     "schema_version": 3,
     "solution": false,
     "task": false
    }
   },
   "source": [
    "<div style=\"background-color:rgba(100, 160, 200, 0.33);\">\n",
    "<p>\n",
    "<b>b) [0.5 credits]</b> What is the difference between public-key and password authentication as offered by SSH?\n",
    "</p>\n",
    "</div>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": false,
    "nbgrader": {
     "cell_type": "markdown",
     "checksum": "4c92512f98bbb745c49bb5287060e945",
     "grade": true,
     "grade_id": "cell-6f79090e7cdecec4",
     "locked": false,
     "points": 0.5,
     "schema_version": 3,
     "solution": true,
     "task": false
    }
   },
   "source": [
    "YOUR ANSWER HERE"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": false,
    "editable": false,
    "nbgrader": {
     "cell_type": "markdown",
     "checksum": "d1c6cc8fefc84407e3795e9357da0275",
     "grade": false,
     "grade_id": "cell-f615de0f43c772de",
     "locked": true,
     "schema_version": 3,
     "solution": false,
     "task": false
    }
   },
   "source": [
    "<div style=\"background-color:rgba(100, 160, 200, 0.33);\">\n",
    "<p>\n",
    "<b>c) [1.0 credits]</b>\n",
    "SSH can be used to connect to your testbed VM and execute code (e.g., Jupyter).\n",
    "    \n",
    "You can connect to your VM (in this case we use the host i1-router0) using the command:\n",
    "<p style=\"font-family: monospace\">ssh -L localhost:1337:localhost:1337 -J testbed.acn.net.cit.tum.de root@i1-router0</p>\n",
    "Explain in detail what each part in this command does.\n",
    "</p>\n",
    "</div>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": false,
    "nbgrader": {
     "cell_type": "markdown",
     "checksum": "c418e2e113e310515815c0d3837c9abf",
     "grade": true,
     "grade_id": "cell-693638ae66c5586f",
     "locked": false,
     "points": 1,
     "schema_version": 3,
     "solution": true,
     "task": false
    }
   },
   "source": [
    "<p style=\"font-family: monospace\">ssh -L localhost:1337:localhost:1337 -J testbed.acn.net.cit.tum.de root@i1-router0</p>\n",
    "\n",
    "* <span style=\"font-family: monospace\">ssh -L</span>:\n",
    "  YOUR ANSWER HERE\n",
    "* <span style=\"font-family: monospace\">localhost:1337:localhost:1337</span>:\n",
    "  YOUR ANSWER HERE\n",
    "* <span style=\"font-family: monospace\">-J testbed.acn.net.cit.tum.de</span>:\n",
    "  YOUR ANSWER HERE\n",
    "* <span style=\"font-family: monospace\">root@i1-router0</span>:\n",
    "  YOUR ANSWER HERE\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": false,
    "editable": false,
    "nbgrader": {
     "cell_type": "markdown",
     "checksum": "102d33ba71488b20f21aa97ef9068efa",
     "grade": false,
     "grade_id": "cell-3df3a0d38d8ae4bd",
     "locked": true,
     "schema_version": 3,
     "solution": false,
     "task": false
    }
   },
   "source": [
    "<div style=\"background-color:rgba(100, 160, 200, 0.33);\">\n",
    "<p>\n",
    "<b>d) [1.0 credits]</b>\n",
    "Connect to your virtual machine using SSH and execute the following three commands:\n",
    "    \n",
    "* <span style=\"font-family: monospace\">whoami</span>\n",
    "* <span style=\"font-family: monospace\">uname -a</span>\n",
    "* <span style=\"font-family: monospace\">pwd</span>\n",
    "    \n",
    "Paste the output of each of the three commands into your answer and explain what each command does.\n",
    "</p>\n",
    "</div>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": false,
    "nbgrader": {
     "cell_type": "markdown",
     "checksum": "bc85301d735e3ae478bdfe7ba6201860",
     "grade": true,
     "grade_id": "cell-62bd525d5a25cc51",
     "locked": false,
     "points": 1,
     "schema_version": 3,
     "solution": true,
     "task": false
    }
   },
   "source": [
    "\n",
    "\n",
    "* <b>whoami:</b> \n",
    "YOUR ANSWER HERE\n",
    "\n",
    "* <b>uname -a:</b> \n",
    "YOUR ANSWER HERE\n",
    "\n",
    "* <b>pwd:</b> \n",
    "YOUR ANSWER HERE\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": false,
    "editable": false,
    "nbgrader": {
     "cell_type": "markdown",
     "checksum": "98175e258e37ad6f23951e183434b81f",
     "grade": false,
     "grade_id": "cell-9d0b2555f8ed32c3",
     "locked": true,
     "schema_version": 3,
     "solution": false,
     "task": false
    }
   },
   "source": [
    "<div style=\"background-color:rgba(100, 160, 200, 0.33);\">\n",
    "<p><b>Advanced Computer Networking by Prof. Dr.-Ing. Georg Carle</b></p>\n",
    "Teaching assistants: Christian Dietze, Sebastian Gallenmüller, Marcel Kempf, Lorenz Lehle, Patrick Dirks, Oliver Dürer\n",
    "</div>"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.14"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
