How To

  1. Create two virtual machines Student(student-console) and Test(SimpleArbiterDhcpGw)
  2. Change the network settings to both virtual machines. SimpleArbiterDhcpGw: Adapter 1 set it to NAT, for internet access and Adapter 2 to internal network for local network. Student: Adapter1 set it to "internal-network" so it is in the same domestic network as SimpleArbiterDhcpGw.


  3. Login into Student
  4. In Student(student-console) create a new user,as the task demands of you ( eg. marjankoral19 ), with a custom password.
  5. In Student(student-console) open interfaces file ( nano /etc/network/interfaces ) and set the IP
  6. We can check which interface belongs to which adapter in Virtual-box with MAC address. Run ifconfig command and compare the HWaddr value with the value in the Virtual-box ( settings => network => adapter => Mac address )
  7. Then edit the /etc/motd, file with the specified string. (eg. "Not for Human consumption" )
  8. For testing login with the test user into Test(SimpleArbiterDhcpGw)
  9. Then connect to Student with ssh using the user marjankoral19 - ssh marjankoral@ip.
  10. If the login was successful, the Message of the day should apear.
  11. To run Kpov_judge, login onto SimpleArbiterDhcpGw, find and run the file test_task.py ( with ./test_task.py as all other scripts )
  12. A window appears as we can see on the image above, then press Enter, enter your username ( eg. dr6784@student.uni-lj.si ), password, task name (eg. 01-preparation-set_motd), enter the string we should get in motd, enter the username and password of a user on Student(student-console)(eg. marjankoral19), the IP of Student(student-console), and after a brief moment we should get the result.

=======

Purpose of the exercise

How to create user? How to edit a file? How to connect to anoter computer using ssh? How to find out the computer IP address?

Brief description

Set up two virtual machines, set MOTD. Connect using ssh.