# Remote ssh

To remotely access your Raspberry Pi using SSH, we only need to add a rule to your router so that it can route the incoming ssh traffic to your Raspberry. In particular, it will route incoming traffic at port 22 (default SSH port) to the SSH port of your Raspberry Pi.&#x20;

Before proceeding, make sure you have [configured your Raspberry](/home-setup/raspberry/untitled.md) accordingly and [enabled Dynamic DNS](/home-setup/remote-access/dynamic-dns.md).

Go to your router portal (e.g. 192.168.1.1) and enter your router admin credentials (they might be in the back of your router; otherwise reach out to your manufacturer / ISP). Got to the NAT section and add the rule.

![](https://cdn-images-1.medium.com/max/1600/1*6K1eeo3TbtyQrK4CDw8-sQ.png)

Time to test your connection!

```
$ ssh pi@lucas-example.2mydns.net
```


---

# Agent Instructions: 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://notes.lcsrg.me/home-setup/remote-access/remote-ssh.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.
