> 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`
