Table of Contents
Abilitate root login
By default, when installing the OS, root can’t login via ssh, so we need to enable it.
-
Open the ssh config file:
$ ee /etc/ssh/sshd_config -
Edit/Add the following option as such:
PermitRootLogin yesNote: by default, it’s
no. There’s also another optionwithout-passwordfor enabling just login via rsa ssh key and disabling via password. -
Refresh the settings:
$ service sshd reloadNote: by doing
reloadinstead ofrestart, the already connected ssh connections will stay connected and working
Switch SSH port
By default, the (sftp) ssh port is 22, but it’s easily swichable.
-
Open the ssh config file:
$ ee /etc/ssh/sshd_config -
Edit/Add the following option as such specifying a different port number: (it’s advised to use a number above 1024 since the first 1024 are reserved)
Port 22 -
Refresh the settings:
$ service sshd reloadNote: by doing
reloadinstead ofrestart, the already connected ssh connections will stay connected and working
How to create an RSA ssh key
Moved in Here