Getting started with Linux VMs

Before getting started

Select the folder where you want to perform the operations. If there is no such folder, create one:

  1. In the management console, click Create folder.

  2. Enter the folder name.

    The name may contain lowercase Latin letters, numbers, and hyphens. The first character must be a letter. The last character can't be a hyphen. The name length must be from 3 to 63 characters.

  3. Click Create folder.

Create your first VM

To create a VM:

  1. Open the folder where the VM will be created.

  2. Click Create resource.

  3. Select Virtual machine.

  4. In the Name field, enter the VM name.

    The name must be unique within the folder. The name may contain lowercase Latin letters, numbers, and hyphens. The first character must be a letter. The last character can't be a hyphen. The maximum name length is 63 characters.

  5. Select the availability zone to locate the VM in.

  6. Select one of the public images on Linux.

  7. In the Computing resources section, choose the type of core usage (partial or full), and specify the required amount of vCPUs and RAM.

  8. In the Network settings section, select the subnet to connect the VM to when creating it.

  9. Specify data required for accessing the VM:

    • Enter the username in the Login field.
    • In the SSH key field, paste the contents of the public key file. You need to create a key pair for SSH connection yourself. To generate keys, use third-party tools, such as ssh-keygen utilities on Linux and macOS or PuTTygen on Windows.
  10. Click Create VM.

When creating a VM, it is assigned an IP address and a host name (FQDN). You can use this data to access a virtual machine via SSH.

Connect to a Linux VM via SSH

The recommended method for connecting to a virtual machine over SSH is based on using a key pair: the open key is placed on the virtual machine, and the private key is stored on the user's device. Connecting with a key pair is more secure than connecting with a username and password.

Note

In public Linux images provided by Yandex.Cloud, the ability to connect via SSH using login and password is disabled by default.

You can connect to the virtual machine over SSH when it starts. You can use the ssh tool on Linux and macOS and PuTTy for Windows. Don't forget to set up the created key pair: the private key must match the public key sent to the VM.

To connect, you have to specify the address of the VM. This can be its IP address or the FQDN. Access via FQDN is possible from another Yandex.Cloud VM, if it is connected to the same virtual network. You can find out the IP address in the management console. Go to the Network section on the virtual machine's page.