Changing the Ubuntu user name.

To begin with, it is recommended to perform an update:

sudo apt update && sudo apt upgrade

Creating a user and answering the questions:
adduser user_name

Now you need to add the created user to sudo:
adduser sudo user_name

If the adduser command is not available, you can do it via visudo. To open the /etc/sudoers file, enter:
sudo visudo
you need to add the line user_name ALL=(ALL) ALL and save it.

Now you need to perform basic security settings, open sshd_config:
nano /etc/ssh/sshd_config

And we change / add lines:
Disable authorization from root by replacing the string PermitRootLogin yes with PermitRootLogin no
Allow ssh connection only to the created user by adding/replacing the AllowUsers username string
Prohibit the use of .rhosts files by adding/replacing the line IgnoreRhosts yes
Prohibit cross-hosting authentication (Host-Based Authentication) by adding / replacing the HostbasedAuthentication no string

Next, restart ssh:

systemctl restart sshd

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Install and Setup LAMP on CentOS VPS

LAMP (Linux - Apache - MySQL - PHP) is a common webserver software stack for Linux. Installing...

How to get a trial period VPS / VDS?

We provide a test server for a period of up to 1 day.To receive trial period VPS / VDS you need:...

How to install ionCube Loader on ISPmanager?

How to install ionCube Loader on ISPmanagerCheck OS version / x86_64 or x86$ uname -aDownload the...

Windows Server - Change the Administrator Password

Procedures for changing Administrator passwords This topic provides procedures to change...

Как получить пробный период VPS / VDS от Asvhost?

Как получить пробный период VPS / VDS? Мы предлагаем тестовый виртуальный сервер на срок от 1...