T-110.5102 Laboratory Works in Networking and Security (5-10 cr)

Tips & advice


General tips

You do not always have to type in your password:

  • Use SSH keys to authenticate yourself in login (search with google). 
  • Remove the password prompt for sudo, by creating a file /etc/sudoers.d/localhost with a line "labrat ALL=(ALL) NOPASSWD: ALL". Set the file permissions to 0440.

Using SSH keys is a generally good idea, but disabling the password prompt for sudo is not. However, in this course it makes sense because there are time constraints in the demos, and you are still required to use sudo in front of command that requires root privileges. Using root privileges when not needed is stupid and does not show understanding (e.g., doing the whole assigment with "sudo -s").

You can also skip writing the whole "ssh labrat@farm1.niks..." command by taking advantage of the alias command (google) or a proper SSH config ("man ssh_config"  or google).