Read more

Setup (and secure) an SSH server on Ubuntu

Martin Straub
March 18, 2011Software engineer at makandra GmbH

Install OpenSSH Server:

sudo apt-get install openssh-server
Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

To check if the server is running you should get no error when you restart it:

sudo /etc/init.d/ssh restart

Now your ssh server is ready to use.

To add additional security edit your sshd_config (gksudo gedit /etc/ssh/sshd_config):

# Deny root login:
PermitRootLogin no

# To whitelist users:
AllowUsers USERNAME1 USERNAME2

# To disable interactive authentication (without SSH key)
PasswordAuthentication no

Don't forget to restart after editing the sshd_config:

sudo service ssh restart

(Tested on Ubuntu 14.04)

Posted by Martin Straub to makandra dev (2011-03-18 11:47)