# SSH Setup

Install the SSH daemon. This must be done in a Terminal window on the Pi.

```bash
sudo apt update && sudo apt install ssh

sudo systemctl start ssh && sudo systemctl enable ssh
```

Next, you will need to [find your IP](https://help.ubuntu.com/stable/ubuntu-help/net-findip.html.en#:~:text=network\)%20IP%20address-,Open%20the%20Activities%20overview%20and%20start%20typing%20Settings.,sidebar%20to%20open%20the%20panel.\&text=Click%20the-,button%20next%20to%20the%20active%20connection,IP%20address%20and%20other%20details.). Avoid using the dynamic `pi.local` address as this uses mDNS which can cause unexpected behavior in other applications.&#x20;

{% hint style="info" %}
Make sure the Pi is connected to your router to get the correct IP address.
{% endhint %}

Verify you can ping the device at its IP address from your windows machine:

1. Add the IP and host name to [/etc/hosts](https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/How-to-edit-the-Ubnutu-hosts-file-and-ping-a-domain-name-locally) or [C:\windows\system32\drivers\etc\hosts](https://kb.parallels.com/129398/) file and ping the host name

```bash
$ ping pi5-tutorial
PING pi5-tutorial (100.64.155.31) 56(84) bytes of data.
64 bytes from pi5-tutorial (100.64.155.31): icmp_seq=1 ttl=64 time=60.4 ms
64 bytes from pi5-tutorial (100.64.155.31): icmp_seq=2 ttl=64 time=6.26 ms
^C
--- pi5-tutorial ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 6.255/33.340/60.426/27.085 ms
```

OR

2. Type out the IP address each time

```bash
$ ping 100.64.155.31
PING 100.64.155.31 (100.64.155.31) 56(84) bytes of data.
64 bytes from 100.64.155.31: icmp_seq=1 ttl=64 time=81.8 ms
^C
--- 100.64.155.31 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 81.796/81.796/81.796/0.000 ms
```

I will use `pi5-tutorial` as the hostname and `pi` as the user for the rest of the tutorial.

Verify you can SSH into the Pi from your windows machine with the command `ssh user@hostname`

```bash
$ ssh pi@pi5-tutorial
The authenticity of host 'pi5-tutorial (100.64.155.31)' can't be established.
ED25519 key fingerprint is SHA256:gaErV4cIsStaQjpiTEljI1Ac2NETlUHMnipmgd6nwC0.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'pi5-tutorial' (ED25519) to the list of known hosts.
pi@pi5-tutorial's password:
Welcome to Ubuntu 24.04 LTS (GNU/Linux 6.8.0-1031-raspi aarch64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/pro

Expanded Security Maintenance for Applications is not enabled.

295 updates can be applied immediately.
119 of these updates are standard security updates.
To see these additional updates run: apt list --upgradable

Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status


The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

pi@pi5:~$
```

Proceed to step #4 of [Getting Started](/cyclops/getting-started.md#setup-steps)


---

# 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://docs.theseus.us/cyclops/cyclops-computer/pi-5-walkthrough/ssh-setup.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.
