> ## Documentation Index
> Fetch the complete documentation index at: https://gcore.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect to a Virtual Machine via SSH

The SSH protocol is a method for secure remote login from one server to another. You can use SSH to connect to Gcore Virtual Machines running Linux.

The connection can be established in two ways:

1\. With SSH keys

2\. With keys and a password

The second option is available only if you set up a password while creating your VM. Learn how to set up a password for Linux in our guide about [customizing the initial setup of your VM](/cloud/virtual-instances/customize-initial-setup-for-your-instance#customize-the-initial-setup-for-your-instance).

<Info>
  **Info**

  If you want to connect to your VM via the Gcore Customer Portal, follow the instructions in our guide about [connecting to a VM](/cloud/virtual-instances/connect/connect-to-your-instance-via-control-panel).
</Info>

## Steps to establish an SSH connection

1\. [Configure and manage SSH keys](/cloud/virtual-instances/connect/connect-to-your-instance-via-ssh): Create and set up a pair of keys: a public key stored in the Gcore Customer Portal and a private key stored in your local storage.

2\. (Optional). [Convert your keys to .ppk format](/cloud/ssh-keys/convert-an-ssh-key-from-pem-to-ppk): If you generated SSH keys via PuTTY, convert the keys to the supported .ppk format.

3\. [Configure firewall settings](/cloud/networking/add-and-configure-a-firewall#use-the-default-firewall): Set up the necessary protocols in firewall settings to allow outgoing and incoming connections to an instance.

4\. [Establish an SSH connection with an instance](/cloud/virtual-instances/connect/connect-via-ssh/establish-ssh-connection-to-an-instance): Authenticate a VM using the recommended method for your operating system.
