Linux: Install ssh server

If you want to securely log into your Linux computer remotely, you will want to install the open-ssh server on it. Here are the steps:
  1. Install the software: by typing sudo apt install openssh-server
  2. Configure the server editing the /etc/ssh/sshd_config file. (Note: save a backup copy of it first.)
  3. Restart the server with the new settings by typing sudo service sshd restart
Note that the ssh server is a doorway into your system and so simply having it installed reduces your system security. Some important things you can do to reduce the risk are:
  • Limit the users who can log in with the AllowUsers <user list> option
  • Force secure key encrypted access by preventing password access with the PubkeyAuthentication yes and PasswordAuthentication no options
These options are enabled in the aforementioned sshd_config file.
12 / 2019