SSH ROOT LOGIN AND PORT CHANGE UBUNTU 18/20

xxenyx

New member
Joined
Sep 21, 2021
Messages
13
Offline
# Open PuTTY
# Paste the IP or hostname of your dedicated server
# Hit Enter

# Ignore security concerns and type 'Yes' when prompted
# Provide your company-provided username (e.g., lofertech)
# Enter the password for the provided username

# Switch to Root User
su root

# Enter Root Password when prompted

# Enable Root Login
apt-get install nano && nano /etc/ssh/sshd_config

# Inside the file, locate and modify the line:
# #PermitRootLogin prohibit-password
# Remove '#' and replace 'prohibit-password' with 'yes'

# Save and Exit
# Type CTRL + X, then 'Y', and hit Enter

# Restart SSH
sudo /etc/init.d/ssh restart

# Change Root Password
passwd
 
Top