ssh-keyup 1.1.0__tar.gz → 1.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,181 @@
1
+ Metadata-Version: 2.4
2
+ Name: ssh-keyup
3
+ Version: 1.2.0
4
+ Summary: Passwordless SSH setup and ssh-copy-id alternative for Raspberry Pi, NVIDIA Jetson or any Linux device
5
+ Home-page: https://github.com/Kurokesu/ssh-keyup
6
+ Author: UAB Kurokesu
7
+ License: GPL-3.0-or-later
8
+ Project-URL: Repository, https://github.com/Kurokesu/ssh-keyup
9
+ Project-URL: Issues, https://github.com/Kurokesu/ssh-keyup/issues
10
+ Project-URL: Changelog, https://github.com/Kurokesu/ssh-keyup/releases
11
+ Keywords: ssh,ssh-keys,ssh-config,ssh-copy-id,passwordless-ssh,openssh,ed25519,raspberry-pi,rpi,jetson,iot,automation,vscode,remote-ssh,windows,linux
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: System Administrators
16
+ Classifier: Operating System :: Microsoft :: Windows
17
+ Classifier: Operating System :: POSIX :: Linux
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Topic :: System :: Systems Administration
20
+ Classifier: Topic :: Utilities
21
+ Requires-Python: >=3.8
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Dynamic: license-file
25
+
26
+ # ssh-keyup
27
+
28
+ ![CI](https://github.com/Kurokesu/ssh-keyup/actions/workflows/ci.yml/badge.svg)
29
+ ![PyPI](https://img.shields.io/pypi/v/ssh-keyup)
30
+ ![Python](https://img.shields.io/badge/python-3.8%2B-brightgreen)
31
+ ![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20Linux-blue)
32
+
33
+ **Set up passwordless SSH on Raspberry Pi, NVIDIA Jetson or any Linux device in one command.**
34
+
35
+ Tired of juggling `ssh-keygen`, `ssh-copy-id` (missing on Windows) and `~/.ssh/config` edits every time you set up a new device?
36
+
37
+ **`ssh-keyup`** handles all three in one interactive session.
38
+
39
+ ![One ssh-keyup session setting up a Raspberry Pi, then ssh to mypi alias logging in with no password.](https://raw.githubusercontent.com/Kurokesu/ssh-keyup/main/docs/demo.gif)
40
+
41
+ ## Quickstart
42
+
43
+ Install globally with pip:
44
+
45
+ ```bash
46
+ pip install ssh-keyup
47
+
48
+ ssh-keyup # ready to use anywhere
49
+ ```
50
+
51
+ > **Tip:** If `ssh-keyup` is missing or runs an old version after install, new script sits in a folder outside PATH (pip warns about this). Add that folder to PATH, or install with [pipx](https://pipx.pypa.io/) instead:
52
+ >
53
+ > `pipx install ssh-keyup`
54
+
55
+ Or run directly without installing:
56
+
57
+ ```bash
58
+ git clone https://github.com/Kurokesu/ssh-keyup.git
59
+ cd ssh-keyup
60
+ python ssh_keyup.py # Windows
61
+ python3 ssh_keyup.py # Linux
62
+ ```
63
+
64
+ Follow prompts, enter remote password once and you're done. Alias now works in anything that reads `~/.ssh/config`:
65
+
66
+ **Terminal:**
67
+
68
+ ```bash
69
+ ssh mypi # no password, ever again
70
+ ```
71
+
72
+ **VSCode:** [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) works out of the box. Press `Ctrl+Shift+P`, select **Remote-SSH: Connect to Host** and pick your alias for a full IDE on the device, no password:
73
+
74
+ ![VSCode connecting to the mypi alias over Remote SSH without a password.](https://raw.githubusercontent.com/Kurokesu/ssh-keyup/main/docs/demo-vscode.gif)
75
+
76
+ ## Usage
77
+
78
+ ### Skip prompts
79
+
80
+ ```bash
81
+ ssh-keyup pi@192.168.1.23 mypi # user, host and alias in one go
82
+ ```
83
+
84
+ Flags (`--host`, `--user`, `--alias`) work too, see `ssh-keyup --help`.
85
+
86
+ ### Set up a fleet
87
+
88
+ ```bash
89
+ for host in 192.168.1.10 192.168.1.11 192.168.1.12; do
90
+ ssh-keyup pi@$host
91
+ done
92
+ ```
93
+
94
+ ### Manage entries
95
+
96
+ List or remove entries ssh-keyup manages:
97
+
98
+ ```bash
99
+ ssh-keyup --list
100
+ ssh-keyup --remove mypi # deletes its key pair too
101
+ ```
102
+
103
+ ## Prerequisites
104
+
105
+ **Python 3.8+** and OpenSSH tools (`ssh`, `ssh-keygen`) in PATH.
106
+
107
+ - **Windows 10/11**: Python from [python.org](https://www.python.org/downloads/) or Microsoft Store. OpenSSH Client via Settings > Optional Features or [Git for Windows](https://gitforwindows.org).
108
+ - **Linux**: `sudo apt install python3 openssh-client` (usually pre-installed).
109
+
110
+ ## How it works
111
+
112
+ ```mermaid
113
+ flowchart LR
114
+ run["ssh-keyup"] --> check["check connection"]
115
+ check --> gen["generate ed25519 key<br/>~/.ssh/id_ed25519_mypi"]
116
+ gen --> deploy["deploy public key<br/>target: ~/.ssh/authorized_keys"]
117
+ deploy --> config["update ssh config<br/>~/.ssh/config"]
118
+ ```
119
+
120
+ ## Features
121
+
122
+ - Works on **Windows OpenSSH**, where `ssh-copy-id` does not exist
123
+ - **Never touches your password**. Only the public key is piped over SSH and OpenSSH prompts for the password itself
124
+ - One **Ed25519** key per device (`~/.ssh/id_ed25519_<alias>`), not one key reused everywhere
125
+ - Deploys in a **single SSH session**, one password prompt total
126
+ - Adds a named entry to `~/.ssh/config`, works instantly with `ssh <alias>` and VSCode Remote SSH
127
+ - Checks host is **reachable** first, so typos surface before keys exist
128
+ - Recovers from **host key mismatches** after a reflash
129
+ - **Entry management**, list or retire devices without leaving stale keys behind
130
+ - **Zero dependencies**, standard library plus system OpenSSH
131
+
132
+ ## FAQ
133
+
134
+ ### Why not do it by hand?
135
+
136
+ Usual commands for passwordless SSH from Windows:
137
+
138
+ ```powershell
139
+ ssh-keygen -t ed25519
140
+ type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh pi@raspberrypi.local "cat >> ~/.ssh/authorized_keys"
141
+ notepad $env:USERPROFILE\.ssh\config # then add a Host block by hand
142
+ ```
143
+
144
+ Works once. Same key lands on every device, `~/.ssh` keeps default permissions that sshd may reject and each new device means another config edit.
145
+
146
+ ### Why not ssh-copy-id?
147
+
148
+ `ssh-copy-id` appends a key to `authorized_keys` and stops there. Windows OpenSSH does not ship it at all.
149
+
150
+ | | ssh-keyup | ssh-copy-id |
151
+ |---|:---:|:---:|
152
+ | Works on Windows OpenSSH | yes | no |
153
+ | Ed25519 key per device | yes | no |
154
+ | Sets `authorized_keys` permissions | yes | yes |
155
+ | Writes `~/.ssh/config` alias | yes | no |
156
+ | Recovers from changed host key | yes | no |
157
+ | Entry management | yes | no |
158
+
159
+ ### How do I fix "REMOTE HOST IDENTIFICATION HAS CHANGED"?
160
+
161
+ Reflashing creates a new host key, so next `ssh` refuses to connect:
162
+
163
+ ```text
164
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
165
+ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
166
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
167
+ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
168
+ ...
169
+ Offending ECDSA key in ~/.ssh/known_hosts:3
170
+ Host key verification failed.
171
+ ```
172
+
173
+ Run `ssh-keyup` again. It detects a changed key, shows new fingerprint for confirmation, clears stale `known_hosts` entry with `ssh-keygen -R` and redeploys. Usually a reflash is behind it, but this warning can also mean a real man-in-the-middle, so `ssh-keyup` asks instead of trusting silently.
174
+
175
+ ### Does `--remove` clean up entries on the device?
176
+
177
+ No. It deletes local key pair and `~/.ssh/config` entry. Line in the device's `authorized_keys` stays until removed there.
178
+
179
+ ### What devices are supported?
180
+
181
+ Anything reachable over SSH: Raspberry Pi, NVIDIA Jetson, Orange Pi, VMs, servers.
@@ -0,0 +1,156 @@
1
+ # ssh-keyup
2
+
3
+ ![CI](https://github.com/Kurokesu/ssh-keyup/actions/workflows/ci.yml/badge.svg)
4
+ ![PyPI](https://img.shields.io/pypi/v/ssh-keyup)
5
+ ![Python](https://img.shields.io/badge/python-3.8%2B-brightgreen)
6
+ ![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20Linux-blue)
7
+
8
+ **Set up passwordless SSH on Raspberry Pi, NVIDIA Jetson or any Linux device in one command.**
9
+
10
+ Tired of juggling `ssh-keygen`, `ssh-copy-id` (missing on Windows) and `~/.ssh/config` edits every time you set up a new device?
11
+
12
+ **`ssh-keyup`** handles all three in one interactive session.
13
+
14
+ ![One ssh-keyup session setting up a Raspberry Pi, then ssh to mypi alias logging in with no password.](https://raw.githubusercontent.com/Kurokesu/ssh-keyup/main/docs/demo.gif)
15
+
16
+ ## Quickstart
17
+
18
+ Install globally with pip:
19
+
20
+ ```bash
21
+ pip install ssh-keyup
22
+
23
+ ssh-keyup # ready to use anywhere
24
+ ```
25
+
26
+ > **Tip:** If `ssh-keyup` is missing or runs an old version after install, new script sits in a folder outside PATH (pip warns about this). Add that folder to PATH, or install with [pipx](https://pipx.pypa.io/) instead:
27
+ >
28
+ > `pipx install ssh-keyup`
29
+
30
+ Or run directly without installing:
31
+
32
+ ```bash
33
+ git clone https://github.com/Kurokesu/ssh-keyup.git
34
+ cd ssh-keyup
35
+ python ssh_keyup.py # Windows
36
+ python3 ssh_keyup.py # Linux
37
+ ```
38
+
39
+ Follow prompts, enter remote password once and you're done. Alias now works in anything that reads `~/.ssh/config`:
40
+
41
+ **Terminal:**
42
+
43
+ ```bash
44
+ ssh mypi # no password, ever again
45
+ ```
46
+
47
+ **VSCode:** [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) works out of the box. Press `Ctrl+Shift+P`, select **Remote-SSH: Connect to Host** and pick your alias for a full IDE on the device, no password:
48
+
49
+ ![VSCode connecting to the mypi alias over Remote SSH without a password.](https://raw.githubusercontent.com/Kurokesu/ssh-keyup/main/docs/demo-vscode.gif)
50
+
51
+ ## Usage
52
+
53
+ ### Skip prompts
54
+
55
+ ```bash
56
+ ssh-keyup pi@192.168.1.23 mypi # user, host and alias in one go
57
+ ```
58
+
59
+ Flags (`--host`, `--user`, `--alias`) work too, see `ssh-keyup --help`.
60
+
61
+ ### Set up a fleet
62
+
63
+ ```bash
64
+ for host in 192.168.1.10 192.168.1.11 192.168.1.12; do
65
+ ssh-keyup pi@$host
66
+ done
67
+ ```
68
+
69
+ ### Manage entries
70
+
71
+ List or remove entries ssh-keyup manages:
72
+
73
+ ```bash
74
+ ssh-keyup --list
75
+ ssh-keyup --remove mypi # deletes its key pair too
76
+ ```
77
+
78
+ ## Prerequisites
79
+
80
+ **Python 3.8+** and OpenSSH tools (`ssh`, `ssh-keygen`) in PATH.
81
+
82
+ - **Windows 10/11**: Python from [python.org](https://www.python.org/downloads/) or Microsoft Store. OpenSSH Client via Settings > Optional Features or [Git for Windows](https://gitforwindows.org).
83
+ - **Linux**: `sudo apt install python3 openssh-client` (usually pre-installed).
84
+
85
+ ## How it works
86
+
87
+ ```mermaid
88
+ flowchart LR
89
+ run["ssh-keyup"] --> check["check connection"]
90
+ check --> gen["generate ed25519 key<br/>~/.ssh/id_ed25519_mypi"]
91
+ gen --> deploy["deploy public key<br/>target: ~/.ssh/authorized_keys"]
92
+ deploy --> config["update ssh config<br/>~/.ssh/config"]
93
+ ```
94
+
95
+ ## Features
96
+
97
+ - Works on **Windows OpenSSH**, where `ssh-copy-id` does not exist
98
+ - **Never touches your password**. Only the public key is piped over SSH and OpenSSH prompts for the password itself
99
+ - One **Ed25519** key per device (`~/.ssh/id_ed25519_<alias>`), not one key reused everywhere
100
+ - Deploys in a **single SSH session**, one password prompt total
101
+ - Adds a named entry to `~/.ssh/config`, works instantly with `ssh <alias>` and VSCode Remote SSH
102
+ - Checks host is **reachable** first, so typos surface before keys exist
103
+ - Recovers from **host key mismatches** after a reflash
104
+ - **Entry management**, list or retire devices without leaving stale keys behind
105
+ - **Zero dependencies**, standard library plus system OpenSSH
106
+
107
+ ## FAQ
108
+
109
+ ### Why not do it by hand?
110
+
111
+ Usual commands for passwordless SSH from Windows:
112
+
113
+ ```powershell
114
+ ssh-keygen -t ed25519
115
+ type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh pi@raspberrypi.local "cat >> ~/.ssh/authorized_keys"
116
+ notepad $env:USERPROFILE\.ssh\config # then add a Host block by hand
117
+ ```
118
+
119
+ Works once. Same key lands on every device, `~/.ssh` keeps default permissions that sshd may reject and each new device means another config edit.
120
+
121
+ ### Why not ssh-copy-id?
122
+
123
+ `ssh-copy-id` appends a key to `authorized_keys` and stops there. Windows OpenSSH does not ship it at all.
124
+
125
+ | | ssh-keyup | ssh-copy-id |
126
+ |---|:---:|:---:|
127
+ | Works on Windows OpenSSH | yes | no |
128
+ | Ed25519 key per device | yes | no |
129
+ | Sets `authorized_keys` permissions | yes | yes |
130
+ | Writes `~/.ssh/config` alias | yes | no |
131
+ | Recovers from changed host key | yes | no |
132
+ | Entry management | yes | no |
133
+
134
+ ### How do I fix "REMOTE HOST IDENTIFICATION HAS CHANGED"?
135
+
136
+ Reflashing creates a new host key, so next `ssh` refuses to connect:
137
+
138
+ ```text
139
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
140
+ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
141
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
142
+ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
143
+ ...
144
+ Offending ECDSA key in ~/.ssh/known_hosts:3
145
+ Host key verification failed.
146
+ ```
147
+
148
+ Run `ssh-keyup` again. It detects a changed key, shows new fingerprint for confirmation, clears stale `known_hosts` entry with `ssh-keygen -R` and redeploys. Usually a reflash is behind it, but this warning can also mean a real man-in-the-middle, so `ssh-keyup` asks instead of trusting silently.
149
+
150
+ ### Does `--remove` clean up entries on the device?
151
+
152
+ No. It deletes local key pair and `~/.ssh/config` entry. Line in the device's `authorized_keys` stays until removed there.
153
+
154
+ ### What devices are supported?
155
+
156
+ Anything reachable over SSH: Raspberry Pi, NVIDIA Jetson, Orange Pi, VMs, servers.
@@ -5,3 +5,5 @@ build-backend = "setuptools.build_meta"
5
5
  # tool tables are ignored by setuptools, safe next to setup.cfg metadata
6
6
  [tool.ruff]
7
7
  line-length = 79
8
+ # match python_requires, keeps fixes runtime safe on old Pythons
9
+ target-version = "py38"
@@ -1,7 +1,7 @@
1
1
  [metadata]
2
2
  name = ssh-keyup
3
3
  version = attr: ssh_keyup.__version__
4
- description = Passwordless SSH setup for Raspberry Pi, NVIDIA Jetson, or any Linux device
4
+ description = Passwordless SSH setup and ssh-copy-id alternative for Raspberry Pi, NVIDIA Jetson or any Linux device
5
5
  long_description = file: README.md
6
6
  long_description_content_type = text/markdown
7
7
  author = UAB Kurokesu
@@ -10,14 +10,19 @@ license_files = LICENSE
10
10
  url = https://github.com/Kurokesu/ssh-keyup
11
11
  project_urls =
12
12
  Repository = https://github.com/Kurokesu/ssh-keyup
13
- keywords = ssh, ssh-keys, ssh-config, ssh-copy-id, passwordless-ssh, raspberry-pi, rpi, jetson, automation, vscode, remote-ssh
13
+ Issues = https://github.com/Kurokesu/ssh-keyup/issues
14
+ Changelog = https://github.com/Kurokesu/ssh-keyup/releases
15
+ keywords = ssh, ssh-keys, ssh-config, ssh-copy-id, passwordless-ssh, openssh, ed25519, raspberry-pi, rpi, jetson, iot, automation, vscode, remote-ssh, windows, linux
14
16
  classifiers =
15
- Development Status :: 4 - Beta
17
+ Development Status :: 5 - Production/Stable
16
18
  Environment :: Console
19
+ Intended Audience :: Developers
20
+ Intended Audience :: System Administrators
17
21
  Operating System :: Microsoft :: Windows
18
22
  Operating System :: POSIX :: Linux
19
23
  Programming Language :: Python :: 3
20
24
  Topic :: System :: Systems Administration
25
+ Topic :: Utilities
21
26
 
22
27
  [options]
23
28
  py_modules = ssh_keyup
@@ -0,0 +1,181 @@
1
+ Metadata-Version: 2.4
2
+ Name: ssh-keyup
3
+ Version: 1.2.0
4
+ Summary: Passwordless SSH setup and ssh-copy-id alternative for Raspberry Pi, NVIDIA Jetson or any Linux device
5
+ Home-page: https://github.com/Kurokesu/ssh-keyup
6
+ Author: UAB Kurokesu
7
+ License: GPL-3.0-or-later
8
+ Project-URL: Repository, https://github.com/Kurokesu/ssh-keyup
9
+ Project-URL: Issues, https://github.com/Kurokesu/ssh-keyup/issues
10
+ Project-URL: Changelog, https://github.com/Kurokesu/ssh-keyup/releases
11
+ Keywords: ssh,ssh-keys,ssh-config,ssh-copy-id,passwordless-ssh,openssh,ed25519,raspberry-pi,rpi,jetson,iot,automation,vscode,remote-ssh,windows,linux
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: System Administrators
16
+ Classifier: Operating System :: Microsoft :: Windows
17
+ Classifier: Operating System :: POSIX :: Linux
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Topic :: System :: Systems Administration
20
+ Classifier: Topic :: Utilities
21
+ Requires-Python: >=3.8
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Dynamic: license-file
25
+
26
+ # ssh-keyup
27
+
28
+ ![CI](https://github.com/Kurokesu/ssh-keyup/actions/workflows/ci.yml/badge.svg)
29
+ ![PyPI](https://img.shields.io/pypi/v/ssh-keyup)
30
+ ![Python](https://img.shields.io/badge/python-3.8%2B-brightgreen)
31
+ ![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20Linux-blue)
32
+
33
+ **Set up passwordless SSH on Raspberry Pi, NVIDIA Jetson or any Linux device in one command.**
34
+
35
+ Tired of juggling `ssh-keygen`, `ssh-copy-id` (missing on Windows) and `~/.ssh/config` edits every time you set up a new device?
36
+
37
+ **`ssh-keyup`** handles all three in one interactive session.
38
+
39
+ ![One ssh-keyup session setting up a Raspberry Pi, then ssh to mypi alias logging in with no password.](https://raw.githubusercontent.com/Kurokesu/ssh-keyup/main/docs/demo.gif)
40
+
41
+ ## Quickstart
42
+
43
+ Install globally with pip:
44
+
45
+ ```bash
46
+ pip install ssh-keyup
47
+
48
+ ssh-keyup # ready to use anywhere
49
+ ```
50
+
51
+ > **Tip:** If `ssh-keyup` is missing or runs an old version after install, new script sits in a folder outside PATH (pip warns about this). Add that folder to PATH, or install with [pipx](https://pipx.pypa.io/) instead:
52
+ >
53
+ > `pipx install ssh-keyup`
54
+
55
+ Or run directly without installing:
56
+
57
+ ```bash
58
+ git clone https://github.com/Kurokesu/ssh-keyup.git
59
+ cd ssh-keyup
60
+ python ssh_keyup.py # Windows
61
+ python3 ssh_keyup.py # Linux
62
+ ```
63
+
64
+ Follow prompts, enter remote password once and you're done. Alias now works in anything that reads `~/.ssh/config`:
65
+
66
+ **Terminal:**
67
+
68
+ ```bash
69
+ ssh mypi # no password, ever again
70
+ ```
71
+
72
+ **VSCode:** [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) works out of the box. Press `Ctrl+Shift+P`, select **Remote-SSH: Connect to Host** and pick your alias for a full IDE on the device, no password:
73
+
74
+ ![VSCode connecting to the mypi alias over Remote SSH without a password.](https://raw.githubusercontent.com/Kurokesu/ssh-keyup/main/docs/demo-vscode.gif)
75
+
76
+ ## Usage
77
+
78
+ ### Skip prompts
79
+
80
+ ```bash
81
+ ssh-keyup pi@192.168.1.23 mypi # user, host and alias in one go
82
+ ```
83
+
84
+ Flags (`--host`, `--user`, `--alias`) work too, see `ssh-keyup --help`.
85
+
86
+ ### Set up a fleet
87
+
88
+ ```bash
89
+ for host in 192.168.1.10 192.168.1.11 192.168.1.12; do
90
+ ssh-keyup pi@$host
91
+ done
92
+ ```
93
+
94
+ ### Manage entries
95
+
96
+ List or remove entries ssh-keyup manages:
97
+
98
+ ```bash
99
+ ssh-keyup --list
100
+ ssh-keyup --remove mypi # deletes its key pair too
101
+ ```
102
+
103
+ ## Prerequisites
104
+
105
+ **Python 3.8+** and OpenSSH tools (`ssh`, `ssh-keygen`) in PATH.
106
+
107
+ - **Windows 10/11**: Python from [python.org](https://www.python.org/downloads/) or Microsoft Store. OpenSSH Client via Settings > Optional Features or [Git for Windows](https://gitforwindows.org).
108
+ - **Linux**: `sudo apt install python3 openssh-client` (usually pre-installed).
109
+
110
+ ## How it works
111
+
112
+ ```mermaid
113
+ flowchart LR
114
+ run["ssh-keyup"] --> check["check connection"]
115
+ check --> gen["generate ed25519 key<br/>~/.ssh/id_ed25519_mypi"]
116
+ gen --> deploy["deploy public key<br/>target: ~/.ssh/authorized_keys"]
117
+ deploy --> config["update ssh config<br/>~/.ssh/config"]
118
+ ```
119
+
120
+ ## Features
121
+
122
+ - Works on **Windows OpenSSH**, where `ssh-copy-id` does not exist
123
+ - **Never touches your password**. Only the public key is piped over SSH and OpenSSH prompts for the password itself
124
+ - One **Ed25519** key per device (`~/.ssh/id_ed25519_<alias>`), not one key reused everywhere
125
+ - Deploys in a **single SSH session**, one password prompt total
126
+ - Adds a named entry to `~/.ssh/config`, works instantly with `ssh <alias>` and VSCode Remote SSH
127
+ - Checks host is **reachable** first, so typos surface before keys exist
128
+ - Recovers from **host key mismatches** after a reflash
129
+ - **Entry management**, list or retire devices without leaving stale keys behind
130
+ - **Zero dependencies**, standard library plus system OpenSSH
131
+
132
+ ## FAQ
133
+
134
+ ### Why not do it by hand?
135
+
136
+ Usual commands for passwordless SSH from Windows:
137
+
138
+ ```powershell
139
+ ssh-keygen -t ed25519
140
+ type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh pi@raspberrypi.local "cat >> ~/.ssh/authorized_keys"
141
+ notepad $env:USERPROFILE\.ssh\config # then add a Host block by hand
142
+ ```
143
+
144
+ Works once. Same key lands on every device, `~/.ssh` keeps default permissions that sshd may reject and each new device means another config edit.
145
+
146
+ ### Why not ssh-copy-id?
147
+
148
+ `ssh-copy-id` appends a key to `authorized_keys` and stops there. Windows OpenSSH does not ship it at all.
149
+
150
+ | | ssh-keyup | ssh-copy-id |
151
+ |---|:---:|:---:|
152
+ | Works on Windows OpenSSH | yes | no |
153
+ | Ed25519 key per device | yes | no |
154
+ | Sets `authorized_keys` permissions | yes | yes |
155
+ | Writes `~/.ssh/config` alias | yes | no |
156
+ | Recovers from changed host key | yes | no |
157
+ | Entry management | yes | no |
158
+
159
+ ### How do I fix "REMOTE HOST IDENTIFICATION HAS CHANGED"?
160
+
161
+ Reflashing creates a new host key, so next `ssh` refuses to connect:
162
+
163
+ ```text
164
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
165
+ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
166
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
167
+ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
168
+ ...
169
+ Offending ECDSA key in ~/.ssh/known_hosts:3
170
+ Host key verification failed.
171
+ ```
172
+
173
+ Run `ssh-keyup` again. It detects a changed key, shows new fingerprint for confirmation, clears stale `known_hosts` entry with `ssh-keygen -R` and redeploys. Usually a reflash is behind it, but this warning can also mean a real man-in-the-middle, so `ssh-keyup` asks instead of trusting silently.
174
+
175
+ ### Does `--remove` clean up entries on the device?
176
+
177
+ No. It deletes local key pair and `~/.ssh/config` entry. Line in the device's `authorized_keys` stays until removed there.
178
+
179
+ ### What devices are supported?
180
+
181
+ Anything reachable over SSH: Raspberry Pi, NVIDIA Jetson, Orange Pi, VMs, servers.