> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/security/ssh-key-manager/connect-via-ssh.md).

# 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>](/cloud/security/ssh-key-manager/connect-via-ssh/generate-ssh-key.md).

2\. **Store the Default SSH Key:** Save the SSH key in the DCD so you can reuse it. Saving and reusing the key does not apply to an **Ad-hoc SSH key**. For more information, see [<mark style="color:blue;">Manage SSH Keys</mark>](/cloud/security/ssh-key-manager/connect-via-ssh/manage-ssh-keys.md).

3\. **Attach a Linux Storage Image:** Add storage to 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>](/cloud/security/ssh-key-manager/connect-via-ssh/associate-ssh-key-vm.md).

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>](/cloud/security/ssh-key-manager/connect-via-ssh/connect-via-ssh-terminal.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ionos.com/cloud/security/ssh-key-manager/connect-via-ssh.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
