You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
2.8 KiB
77 lines
2.8 KiB
10 months ago
|
# connect to a comma 3/3X
|
||
4 years ago
|
|
||
10 months ago
|
A comma 3/3X is a normal [Linux](https://github.com/commaai/agnos-builder) computer that exposes [SSH](https://wiki.archlinux.org/title/Secure_Shell) and a [serial console](https://wiki.archlinux.org/title/Working_with_the_serial_console).
|
||
|
|
||
|
## Serial Console
|
||
|
|
||
|
On both the comma three and 3X, the serial console is accessible from the main OBD-C port.
|
||
|
Connect the comma 3/3X to your computer with a normal USB C cable, or use a [comma serial](https://comma.ai/shop/comma-serial) for steady 12V power.
|
||
|
|
||
|
On the comma three, the serial console is exposed through a UART-to-USB chip, and `tools/serial/connect.sh` can be used to connect.
|
||
|
|
||
|
On the comma 3X, the serial console is accessible through the [panda](https://github.com/commaai/panda) using the `panda/tests/som_debug.sh` script.
|
||
|
|
||
|
## SSH
|
||
4 years ago
|
|
||
|
In order to SSH into your device, you'll need a GitHub account with SSH keys. See this [GitHub article](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh) for getting your account setup with SSH keys.
|
||
|
|
||
|
* Enable SSH in your device's settings
|
||
|
* Enter your GitHub username in the device's settings
|
||
|
* Connect to your device
|
||
10 months ago
|
* Username: `comma`
|
||
|
* Port: `22`
|
||
4 years ago
|
|
||
3 years ago
|
Here's an example command for connecting to your device using its tethered connection:<br />
|
||
|
`ssh comma@192.168.43.1`
|
||
4 years ago
|
|
||
|
For doing development work on device, it's recommended to use [SSH agent forwarding](https://docs.github.com/en/developers/overview/using-ssh-agent-forwarding).
|
||
|
|
||
10 months ago
|
### Notes
|
||
4 years ago
|
|
||
|
The public keys are only fetched from your GitHub account once. In order to update your device's authorized keys, you'll need to re-enter your GitHub username.
|
||
|
|
||
4 years ago
|
The `id_rsa` key in this directory only works while your device is in the setup state with no software installed. After installation, that default key will be removed.
|
||
|
|
||
10 months ago
|
#### ssh.comma.ai proxy
|
||
3 years ago
|
|
||
10 months ago
|
With a [comma prime subscription](https://comma.ai/connect), you can SSH into your comma device from anywhere.
|
||
3 years ago
|
|
||
10 months ago
|
With the below SSH configuration, you can type `ssh comma-{dongleid}` to connect to your device through `ssh.comma.ai`.
|
||
3 years ago
|
|
||
|
```
|
||
|
Host comma-*
|
||
|
Port 22
|
||
|
User comma
|
||
|
IdentityFile ~/.ssh/my_github_key
|
||
|
ProxyCommand ssh %h@ssh.comma.ai -W %h:%p
|
||
10 months ago
|
|
||
3 years ago
|
Host ssh.comma.ai
|
||
|
Hostname ssh.comma.ai
|
||
|
Port 22
|
||
|
IdentityFile ~/.ssh/my_github_key
|
||
|
```
|
||
|
|
||
|
## One-off connection
|
||
|
|
||
|
```
|
||
|
ssh -i ~/.ssh/my_github_key -o ProxyCommand="ssh -i ~/.ssh/my_github_key -W %h:%p -p %p %h@ssh.comma.ai" comma@ffffffffffffffff
|
||
|
```
|
||
|
(Replace `ffffffffffffffff` with your dongle_id)
|
||
|
|
||
|
## ssh.comma.ai host key fingerprint
|
||
|
|
||
|
```
|
||
|
Host key fingerprint is SHA256:X22GOmfjGb9J04IA2+egtdaJ7vW9Fbtmpz9/x8/W1X4
|
||
|
+---[RSA 4096]----+
|
||
|
| |
|
||
|
| |
|
||
|
| . |
|
||
|
| + o |
|
||
|
| S = + +..|
|
||
|
| + @ = .=|
|
||
|
| . B @ ++=|
|
||
|
| o * B XE|
|
||
|
| .o o OB/|
|
||
|
+----[SHA256]-----+
|
||
|
```
|