> For the complete documentation index, see [llms.txt](https://docs.quickpod.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.quickpod.io/guides/setup-ssh-server-on-pod.md).

# Setup SSH Server on Pod

Clone a public Template like Ubuntu 22.04 and modify the docker options to include -p 22:22 to expose port 22 to the internet.

Connect to the pod using webssh

//run the following commands

`apt update`

`apt install openssh-server vim`

`cd /etc/ssh`

`vi sshd_config`

//uncomment the lines

\#PermitRootLogin prohibit-password

\#PasswordAuthentication yes

save the file with Esc followed by :wq!

//restart sshd with

`service ssh restart`

//go to /root/.ssh

//and paste the contents of your public\_key in file authorized\_keys

`chmod 600 authorized_keys`

connect using default key file

ssh -p EXPOSED\_PORT root\@POD\_PUBLIC\_IP

replace EXPOSED\_PORT with the port mapping for 22 port and use the POD\_PUBLIC\_IP from connect popup

<figure><img src="/files/4iTrxbmrONr68Jvh7bOs" alt=""><figcaption></figcaption></figure>

e.g. `ssh -p 42502 root@136.61.33.107`

if your key is not in the default loation you can specify the key using -i

e.g.

`ssh -p 42502 root@136.61.33.107 -i key.pem`


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.quickpod.io/guides/setup-ssh-server-on-pod.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
