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 用戶發現這個有用
這篇文章有幫助嗎?

相關文章

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:...

The reinstallation of the server via the VPS control panel

If you need to reinstall the operating system or change it to a different version, you can do...

Connection to the server through Remount Desktop

In order to allow the connection, you need to do the following: To get started, we connect to...

Hard disk volume check. How to Extend Drive in Windows.

To check the amount of hard disk space on the server, click the start menu, open Administrative...

Reinstallation CentOS 7 64bit

Go to the VPS Control Panel, select CentOS 7 64bit Minimal, check the box and click Reinstall....