Getting Started – NVMe VPS Instances
Before you can use your new NVMe Instance, there might be some important configurations that need to be completed. On newer Operating Systems, Cloud-init is used to automatically configure important services like networking and updates. In a cloud environment, the default settings mean you cannot log in with the root account or with a password after the instance has been created. You should always use a sub-account and then upgrade your privileges to root to improve security. We have left this default behaviour in place to get customers used to this functionality before we convert to a cloud environment.
First Time Login
The first time you log in to your instance you use the distribution name. If you have installed CentOS then you would use the username centos. If you installed Debian then you would use the username debian. A full list of distribution usernames is;
- CentOS – centos
- Debian – debain
- Ubuntu – ubuntu
- AlmaLinux – almalinux
The only exception to this instances in Germany. If your instance is located in Germany you use the username specified when ordering your instance. Your welcome email specifies the password to your instance.
Next, log in to your client area and from the Products & Services page, click the instance you want to login to. Next, select the NoVNC option.
Use the distribution name (centos, debian, ubuntu, almalinux) or username if located in Germany and password to log in to your instance. You are now at the user level of your instance as indicated by the $ symbol. This account does not have any privileges to make changes. To make changes you need to authenticate. Issue the below code in the console
sudo su -
Notice that there is now a hashtag (#) in the console, previously before authenticating there was a $. You will also notice the console now says “root”. You now have root access to the server. For security reasons you should leave root logins disabled but, if you must have root access over SSH continue reading.
Set Root password
You can now issue the “passwd” command in the console and set a root password. The next time you issue the “sudo su –” command you will be asked for this password which adds another layer of security to your instance.
Allow Root Logins
To enable root login you can edit the sshd_config file. When doing this, always change the default SSH port from 22 to your choice. Take a backup of the sshd_config file first so you can revert back if you make a mistake.
cp /etc/ssh/sshd_config /etc/ssh/sshd_config_bak nano /etc/ssh/sshd_config #Port 22 >>>> Port 2211 #PermitRootLogin yes >>>> PermitRootLogin yes #PasswordAuthentication yes >>>> PasswordAuthentication yes
Now restart the SSH service
systemctl restart sshd
You now have root access to your instance on a custom SSH port.
- When trying to access an instance an error about authentication methods is displayed
- This happens when you have not allowed password authentication. Follow the “Allow Root Logins” section above.
Useful Instance Guides
We have produced a number of Instance Guides that teach you how to perform advanced tasks.
How was this article? – Getting Started NVMe VPS
You might also like
More from Instance Management
If you have installed your Discovery instance using a distribution ISO. Then it's likely your drive will be using a …
How To Configure An Internal MySQL Database Server High-value assets like database servers are always a target for hackers. Typically, these …