Blame
|
1 | # Quick Raspi Login |
||||||
| 2 | ||||||||
| 3 | ## Overview |
|||||||
| 4 | | Action | Command | |
|||||||
| 5 | | - | - | |
|||||||
| 6 | | Create key | `ssh-keygen -t ed25519` | |
|||||||
| 7 | | Copy key | `type "%USERPROFILE%\.ssh\id_ed25519.pub" \| ssh <user-raspi>@<ip-raspi> "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys"` | |
|||||||
| 8 | | Config `.ssh\config` | code see below | |
|||||||
| 9 | | Login | `ssh <user-raspi>` | |
|||||||
| 10 | ``` |
|||||||
| 11 | Host <your-shortcut> |
|||||||
| 12 | HostName <ip-raspi> |
|||||||
| 13 | User <user-raspi> |
|||||||
| 14 | IdentityFile ~/.ssh/id_ed25519 |
|||||||
|
15 | Host <your-shortcut> |
||||||
| 16 | HostName <ip-nanopi> |
|||||||
| 17 | User <user-nanopi> |
|||||||
| 18 | IdentityFile ~/.ssh/id_ed25519 |
|||||||
| 19 | Host <your-shortcut> |
|||||||
| 20 | HostName <hostname-nanopi.local> |
|||||||
| 21 | User <user-nanopi> |
|||||||
| 22 | IdentityFile ~/.ssh/id_ed25519 |
|||||||
|
23 | ``` |
||||||
