Skip to content

Instantly share code, notes, and snippets.

@swagfin
Last active March 23, 2024 09:49
Show Gist options
  • Save swagfin/a9c9e73b76cb9588b2b56d5c28e80ca7 to your computer and use it in GitHub Desktop.
Save swagfin/a9c9e73b76cb9588b2b56d5c28e80ca7 to your computer and use it in GitHub Desktop.
How to install SSH Server and Allow root remove Login on Linux server

Allow Root User Access via SSH

First reset Ubuntu root Password: (Ensure you set a strong password)

sudo passwd root

Thereafter, install Openssh-Client

sudo apt update
sudo apt upgrade
sudo apt install openssh-client

To enable remote root Login via SSH, Open ssh config file

nano /etc/ssh/sshd_config

Then modify this line

PermitRootLogin yes

Finally, save and restart the SSH server

systemctl restart sshd
@swagfin
Copy link
Author

swagfin commented May 23, 2023

To save you troubles with discovery issues, i prefer installing SAMBA server,

 sudo apt install samba -y

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment