# Connect to Virtual Machines via SSH

You can connect to the [<mark style="color:blue;">VM</mark>](https://docs.ionos.com/cloud/support/general-information/glossary-of-terms#vm) through [<mark style="color:blue;">Secure Shell (SSH) Keys</mark>](https://docs.ionos.com/cloud/support/general-information/glossary-of-terms#secure-shell-ssh-keys) in the following ways:

1\. **Generate an SSH Key:** Use this key to connect to a VM using SSH without entering a password. The SSH client uses the private key to authenticate with the VM, and the VM then uses the public key to verify the client's identity. For more information, see [<mark style="color:blue;">Generate SSH Keys</mark>](https://docs.ionos.com/sections-test/guides/security/ssh-key-manager/connect-via-ssh/generate-ssh-key).

2\. **Store the Default SSH Key:** Save the SSH key in the DCD for reusing it. Saving and reusing the key is not applicable for an **Ad-hoc SSH key**. For more information, see [<mark style="color:blue;">Manage SSH Keys</mark>](https://docs.ionos.com/sections-test/guides/security/ssh-key-manager/connect-via-ssh/manage-ssh-keys).

3\. **Attach a Linux Storage Image:** Add an HDD or an SSD storage with a VM and associate either a key saved in the **DCD SSH keys view** or an **Ad-hoc** SSH key with it. You can choose an appropriate SSH key by selecting the respective checkbox. An **Ad-hoc SSH key** must be entered manually. For more information, see [<mark style="color:blue;">Associate an SSH Key with a VM</mark>](https://docs.ionos.com/sections-test/guides/security/ssh-key-manager/connect-via-ssh/associate-ssh-key-vm).

4\. **Establish Connection:** Connect to your VM (Linux) instance using an SSH client of your choice. An SSH client is a collection of tools for establishing SSH connections to remote servers. For example, `OpenSSH`, `PUTTY`, and so on. For more information, see [<mark style="color:blue;">Connect to your VM (Linux) instance via an SSH Client</mark>](https://docs.ionos.com/sections-test/guides/security/ssh-key-manager/connect-via-ssh/connect-via-ssh-terminal).
