Connecting to an Instance
After creating your instance in the panel, you can connect to it via SSH or Remote Desktop, depending on the instance's operating system. This guide explains how to connect to an instance.
Connecting to an Instance via SSH
SSH is a way to connect to the terminal of Linux operating systems. With this method, you can connect to a server's terminal by entering its IP address. You can use various software for this; one of them is PuTTY, which is used on Windows. Simply download PuTTY and enter the IP address of a system that supports the SSH protocol to connect to it. From Linux systems, you can also easily SSH into your instance by typing the command:
ssh ABRAK_IP_ADRESS
After creating an instance in the Arvancloud panel, there are two ways to connect to it:
- Using the username and password sent to your email
- Using a key
Connecting to an Instance with a Username and Password
The default username for the first connection to the instance, depending on the operating system, is as follows:
| Operating System | Default Username |
|---|---|
| Ubuntu | ubuntu |
| Debian | debian |
| Redhat | redhat |
| Centos | centos |
| Cirros | cirros |
You can use various tools to connect to the instance via SSH. One of them is PuTTY. In PuTTY, select Session from the left menu, then enter your instance's IP in the Host Name (or IP address) field and select SSH as the connection type.
After the first connection, the system asks you to change the password of the user you connected with. First enter the password you received by email, then enter your new password. After this, the default password is changed.
Enabling the root User
Initially, the root user of Linux instances is disabled, but after the first connection you can enable root access and connect to your instance directly with this username in later connections.
To do this, when you log in to the instance, the system first asks you to change the password of the user you connected with. After entering the new password and reconnecting to the instance, use the following command to switch to the root user:
sudo –i
Next, set a password for the root user with the following command:
passwd
After entering the new password, the next step is to change the default settings of the sshd_config file. To do this, use the following command to open the file:
nano /etc/ssh/sshd_config
Next, change the value of PermitRootLogin in this file to yes.
Then, to save the new settings and exit the file, press Ctrl+X, then Y, and finally Enter. The last step is to restart the SSH server. To do this, use the following command:
service ssh restart
After these steps, you can SSH into your instance directly as root in later connections.
Connecting to an Instance with an SSH Key
To keep users as secure as possible, when you choose SSH Key while creating an instance in Arvancloud, no password is generated after the new instance is created. For this reason, when creating the instance, users must enter a key known as the public key, so that after the instance starts, they can SSH into it with another key, called the private key, which only they have.
To keep users secure, our cloud infrastructure uses public and private key cryptography for users' initial connection. So you must have your own public and private key before creating an instance, so you can enter your public key into the system when creating the instance and connect to it with your private key after it starts.
How to Create a Public and Private Key
You can use the Arvancloud panel for this. It's as easy as the following steps.
Log in to the Arvancloud panel, go to Security in the Cloud Server menu, and select SSH Key. Then click Create SSH Key.
On the page that opens, enter your public key information or upload it by drag and drop.
If you don't already have a public key, you can click Create New Key to have a key generated automatically.
After this, the public key is automatically shown in the related section, and two links in .pem and .ppk formats are prepared for downloading your private key. You can use the .ppk file for PuTTY and the .pem file for connecting from Linux systems.
Finally, choose a name for your key and click Save. The new key now appears when you create a new instance.
Note that if you already have your own key, you can upload it to Arvancloud in various ways. One of the easiest is the method above: upload your key in the SSH Public Key section, choose a name, and save. You can also do all of this directly in the new instance creation section.
How to Connect to an Instance with a Key
Now that you have created your key and used it to create your instance, you should be able to connect to it. To do this, open PuTTY.
First, in Session, enter the instance's IP address, which you can see in the Arvancloud panel.
Then go to Connection > SSH > Auth, and click Browse to select your private key.
Finally, click Open and wait to connect to your instance.
Connecting to an Instance via Remote Desktop
For the first connection to Windows instances, you need to connect through the console.
To do this, go to Cloud Server and then Instance List in the Arvancloud panel, and click Console in the menu next to the instance's name.
After selecting this option, a console window opens. Press Ctrl+Alt+Del to go to the Windows login screen.
After you reach the login screen, the system first asks you to change the password.
After entering and confirming the password you want, you can enter the Windows environment. Note that the password must be complex (a combination of uppercase and lowercase letters, different characters, and numbers).
Now that the password is set, you can use the Windows Remote Desktop Connection service to connect to your instance in later sessions. First, make sure this service is enabled on the instance's Windows Server. To do this, open Server Manager from the Start menu and click Local Server in the left menu. In the window that opens, Enabled should appear next to Remote Desktop.
If Disabled appears next to it, click it, select Allow remote connections to this computer in the window that opens, and click OK.
After making these settings on the instance, you can connect to it with Remote Desktop.
Remote Desktop Connection
To access the instance with Remote Desktop, press the Windows and R keys together and type mstsc in the Run window.
In the window that opens, enter your instance's IP address, which is shown next to your instance in the Instance List of the Arvancloud panel. Then click Show Options. In the Username field, enter Administrator. You can also select Allow me to save credentials to save the login information, so you don't need to enter the username and password in later Remote Desktop sessions. Finally, click Connect.
Next, in the window that opens, enter the password you chose on the first connection to the instance in the Password field and click OK.
If, after clicking OK, a certificate warning window appears, select Don't ask me again for connections to this computer and click Yes.
You can now connect to your instance using RDP.