VMmanager: Administrator guide
en En
es Es

SSH protocol

SSH is a network protocol for connecting remotely to a server. SSH uses traffic encryption algorithms, so a SSH connection is secure.

The connection is made under a remote server account. A password or SSH keys are used for authentication.

The software for SSH consists of two parts:

  • server — installed on a remote server;
  • client — installed on the user's computer.

Work logic

When you create a Unix family virtual machine (VM), the platform installs and configures an OpenSSH server on the VM. The server starts on port 22/TCP and waits for client connections.

If the VM owner has specified their keys in the client area, these keys will be recorded in the /root/.ssh/authorized_keys file on the VM. This will allow the VM owner to connect using an SSH key without additional configuration.

Connecting to a VM via SSH

Installing client software

For the Unix OS family (Ubuntu, Debian, AlmaLinux, macOS, etc.), no additional software is required. 

For Windows 10 or higher, install the OpenSSH client component.

Connecting with a login and password

  1. Open the terminal window or the console.
  2. Enter the command:

    ssh root@host
    Comments to the command
  3. Enter the root password of the VM.

Connecting using SSH keys

SSH key consists of a pair of keys — the private key and the public key. The private key is the secret information that is kept by the user. The public key must be stored on the server to be accessed via SSH.

  1. Generate the key:
    1. Open the terminal window or the console.
    2. Enter the command:

      ssh-keygen
    3. Specify the name and path to the file for SSH keys. By default, in Windows, the SSH key is stored in the C:\Users\<username>\.ssh\ directory, and in Unix family OS — in /home/<username>/.ssh/. By default, the private key is saved to the id_rsa file, and the public key — to id_rsa.pub.
  2. Copy the key to the VM:
    • to add the key in new VMs automatically, specify it in the client area;
    • to provide the key to an existing VM, copy its contents to the /root/.ssh/authorized_keys file on the VM. On Unix systems you can use the command to do this:

      ssh-copy-id -i <path_to_key> root@host
      Comments to the command
  3. Connect to the VM:

    1. Open the terminal window or the console.
    2. Enter the command:

      ssh root@host
      Пояснения к команде

Copying files

You can copy files from a workstation to a VM and back using the scp utility. To do this:

  1. Open the terminal window or the console.
  2. Enter the command:

    Copy a file from workstation to VM
    scp <path_to_local_file> <user>@<host>:<path_to_remote_file>
    Copy a file from VM to workstation
    scp <user>@<host>:<path_to_remote_file> <path_to_local_file> 
    Comments to the commands

    Example command:

    scp my_local_file.txt root@192.0.2.1:/root/my_dir/my_remote_file.txt

Possible issues with SSH connection

MessageIssuePossible causesSolution
  • Access denied
  • Permission denied

Authentication error

Incorrect password is specifiedCheck that the password is entered correctly.
SSH key not added

Make sure that:

  • the private part of the SSH key is saved on the device from which you are connecting;
  • the public part of the SSH key is added to the ~/.ssh/authorized_keys file on the server.
Access rights restrictedMake sure the server allows SSH access from your IP address.
  • Connection refused
  • Connection timed out

Connection problem

Incorrect address or port is specifiedMake sure you specify the correct server IP address or domain name and connection port (default is 22).
Connection blocked by firewallCheck the firewall settings on the server. If necessary, open the correct port.
The server is down or unavailablePower on the server or check its connection to the network.
  • Connection reset by peer
The connection is disconnected before the end of data transferNetwork problems have occurredCheck the stability of your internet connection.
The sshd service configuration contains errorsCheck the service configuration in the /etc/ssh/sshd_config file on the server.
  • Host key verification failed
The hash of the server's public key has changed or does not match the entries in the known_hosts fileThe server is using a different key

Delete the entry for the old key with the command  ssh-keygen -R <server_address>

Examine the /var/log/auth.log files on the server for detailed diagnostics.

Useful tips
Related topics:
The article was last updated on 04.16.2025. The article was prepared by technical writers of ISPsystem.