Answers for "enable ssh root connection ubuntu"

3

ubuntu root login ssh

echo "PermitRootLogin yes" | sudo tee -a /etc/ssh/sshd_config
sudo systemctl restart sshd

# NOTE: root login is locked by default, assign a password with:
# [sudo passwd root]

# To lock root login afterwards run
# [sudo passwd -l root]

# To disable root login over ssh afterwards run
# [sed '$d' /etc/ssh/sshd_config | sudo tee /etc/ssh/sshd_config]
Posted by: Guest on July-27-2020
0

ubuntu disable ssh root

#Open the SSH configuration file sshd_config with the text editor vi:
sudo nano /etc/ssh/sshd_config

#In the line PermitRootLogin yes replace the word Yes with the word No.
#Save the file.
#Restart the service.
sudo service ssh restart
Posted by: Guest on September-20-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language