Difference between revisions of "SSH Into Your Device"
From Tinkla: Tinkering with Tesla
m |
m (→SSH When devices is running a version before 0.8.3) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | __TOC__ | ||
== SSH when device is running a version after 0.8.3 == | == SSH when device is running a version after 0.8.3 == | ||
#You need a GitHub account. Make one if you don't already have one. | #You need a GitHub account. Make one if you don't already have one. | ||
− | #Enable SSH on your comma two: | + | #Enable SSH on your comma two: '''Settings -> Network -> Enable SSH''' |
− | #Enter your GitHub username for SSH: Settings -> Network -> SSH Keys (hit | + | #Enter your GitHub username for SSH: '''Settings -> Network -> SSH Keys''' (hit '''Remove''' and then '''Add''' if needed). |
+ | #Obtain the IP of your devices from '''Settings -> Network''' | ||
+ | #Ping the device address from your computer to make sure it is reachable. | ||
+ | #Under a Unix/Linux, macOS terminal or Windows 10 with OpenSSH, use the command: | ||
+ | |||
+ | ssh root@<IP address of comma two> -p 8022 -i <path to private github key> | ||
+ | |||
+ | for Comma two/EON Gold or | ||
+ | |||
+ | ssh root@<IP address of comma three> -p 8022 -i <path to private github key> | ||
+ | |||
+ | for Comma three. | ||
+ | |||
+ | If you assign a fixed IP through your router reservations, then you can configure ssh so you can ssh by just doing '''ssh eon'''. To do so, add the following lines to your '''~/.ssh/config''' file: | ||
+ | Host eon | ||
+ | HostName <IP address of comma two> | ||
+ | Port 8022 | ||
+ | IdentityFile <path to private github key> | ||
+ | StrictHostKeyChecking no | ||
+ | For more info visit [https://github.com/commaai/openpilot/wiki/SSH#openssh-or-similar-client the comma wiki] | ||
− | == SSH | + | == SSH when devices is running a version before 0.8.3 == |
#Download the private key from the [https://github.com/commaai/openpilot/blob/master/tools/ssh/id_rsa openpilot repo]. Save the key file as a text file and name it something like key.pem. | #Download the private key from the [https://github.com/commaai/openpilot/blob/master/tools/ssh/id_rsa openpilot repo]. Save the key file as a text file and name it something like key.pem. | ||
#Open a terminal | #Open a terminal | ||
− | #Run | + | #Run '''chmod 600 key.pem''' (otherwise, the system will think the text file is not safe). |
− | #Get the IP address of your comma two from | + | #Get the IP address of your comma two from '''Settings > WiFi > Open WiFi Settings > More Options > Options (top right icon) > Advanced''' (please make sure your comma two and your computer connect to the same WiFi). |
#Ping the device address from your computer to make sure it is reachable. | #Ping the device address from your computer to make sure it is reachable. | ||
#Under a Unix/Linux, macOS terminal or Windows 10 with OpenSSH, use the command: | #Under a Unix/Linux, macOS terminal or Windows 10 with OpenSSH, use the command: | ||
− | + | ssh root@<IP address of comma two> -p 8022 -i key.pem |
Latest revision as of 20:50, 28 March 2022
Contents
SSH when device is running a version after 0.8.3
- You need a GitHub account. Make one if you don't already have one.
- Enable SSH on your comma two: Settings -> Network -> Enable SSH
- Enter your GitHub username for SSH: Settings -> Network -> SSH Keys (hit Remove and then Add if needed).
- Obtain the IP of your devices from Settings -> Network
- Ping the device address from your computer to make sure it is reachable.
- Under a Unix/Linux, macOS terminal or Windows 10 with OpenSSH, use the command:
ssh root@<IP address of comma two> -p 8022 -i <path to private github key>
for Comma two/EON Gold or
ssh root@<IP address of comma three> -p 8022 -i <path to private github key>
for Comma three.
If you assign a fixed IP through your router reservations, then you can configure ssh so you can ssh by just doing ssh eon. To do so, add the following lines to your ~/.ssh/config file:
Host eon HostName <IP address of comma two> Port 8022 IdentityFile <path to private github key> StrictHostKeyChecking no
For more info visit the comma wiki
SSH when devices is running a version before 0.8.3
- Download the private key from the openpilot repo. Save the key file as a text file and name it something like key.pem.
- Open a terminal
- Run chmod 600 key.pem (otherwise, the system will think the text file is not safe).
- Get the IP address of your comma two from Settings > WiFi > Open WiFi Settings > More Options > Options (top right icon) > Advanced (please make sure your comma two and your computer connect to the same WiFi).
- Ping the device address from your computer to make sure it is reachable.
- Under a Unix/Linux, macOS terminal or Windows 10 with OpenSSH, use the command:
ssh root@<IP address of comma two> -p 8022 -i key.pem