ssh-keyup 1.3.0__tar.gz → 1.4.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.
@@ -1,14 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ssh-keyup
3
- Version: 1.3.0
4
- Summary: Passwordless SSH setup and ssh-copy-id alternative for any Linux or RouterOS device, such as Raspberry Pi, NVIDIA Jetson or MikroTik routers
3
+ Version: 1.4.0
4
+ Summary: Passwordless SSH from Windows or Linux to Raspberry Pi, NVIDIA Jetson, MikroTik routers and other Linux or RouterOS devices. One command, no ssh-copy-id needed
5
5
  Home-page: https://github.com/Kurokesu/ssh-keyup
6
6
  Author: UAB Kurokesu
7
7
  License: GPL-3.0-or-later
8
8
  Project-URL: Repository, https://github.com/Kurokesu/ssh-keyup
9
9
  Project-URL: Issues, https://github.com/Kurokesu/ssh-keyup/issues
10
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,mikrotik,routeros,iot,automation,vscode,remote-ssh,windows,linux
11
+ Keywords: ssh,ssh-key,ssh-keys,ssh-config,ssh-copy-id,authorized-keys,passwordless-ssh,openssh,ed25519,rsa,raspberry-pi,raspberrypi,rpi,jetson,nvidia-jetson,orange-pi,dietpi,mikrotik,routeros,iot,automation,vscode,remote-ssh,windows,linux
12
12
  Classifier: Development Status :: 5 - Production/Stable
13
13
  Classifier: Environment :: Console
14
14
  Classifier: Intended Audience :: Developers
@@ -16,6 +16,14 @@ Classifier: Intended Audience :: System Administrators
16
16
  Classifier: Operating System :: Microsoft :: Windows
17
17
  Classifier: Operating System :: POSIX :: Linux
18
18
  Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.8
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Programming Language :: Python :: 3.14
26
+ Classifier: Topic :: Security
19
27
  Classifier: Topic :: System :: Networking
20
28
  Classifier: Topic :: System :: Systems Administration
21
29
  Classifier: Topic :: Utilities
@@ -41,6 +49,11 @@ Tired of juggling `ssh-keygen`, `ssh-copy-id` (missing on Windows) and `~/.ssh/c
41
49
 
42
50
  ## Quickstart
43
51
 
52
+ Needs **Python 3.8+** and OpenSSH tools (`ssh`, `ssh-keygen`) in PATH:
53
+
54
+ - **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).
55
+ - **Linux**: `sudo apt install python3 openssh-client` (usually pre-installed).
56
+
44
57
  Install globally with pip:
45
58
 
46
59
  ```bash
@@ -70,9 +83,9 @@ Follow prompts, enter remote password once and you're done. Alias now works in a
70
83
  ssh mypi # no password, ever again
71
84
  ```
72
85
 
73
- **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:
86
+ **VS Code:** [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:
74
87
 
75
- ![VSCode connecting to the mypi alias over Remote SSH without a password.](https://raw.githubusercontent.com/Kurokesu/ssh-keyup/main/docs/demo-vscode.gif)
88
+ ![VS Code connecting to the mypi alias over Remote SSH without a password.](https://raw.githubusercontent.com/Kurokesu/ssh-keyup/main/docs/demo-vscode.gif)
76
89
 
77
90
  ## Usage
78
91
 
@@ -84,7 +97,7 @@ ssh-keyup pi@192.168.1.23:2222 mypi # non-default SSH port
84
97
  ssh-keyup admin@192.168.88.1 router # RouterOS, detected automatically
85
98
  ```
86
99
 
87
- Flags (`--host`, `--user`, `--alias`, `--port`, `--os`) work too, see `ssh-keyup --help`
100
+ Flags (`--host`, `--user`, `--alias`, `--port`, `--os`, `--key-type`) work too, see `ssh-keyup --help`
88
101
 
89
102
  ### Set up a fleet
90
103
 
@@ -103,41 +116,34 @@ ssh-keyup --list
103
116
  ssh-keyup --remove mypi # deletes its key pair too
104
117
  ```
105
118
 
106
- ## Prerequisites
107
-
108
- **Python 3.8+** and OpenSSH tools (`ssh`, `ssh-keygen`) in PATH.
109
-
110
- - **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).
111
- - **Linux**: `sudo apt install python3 openssh-client` (usually pre-installed).
112
-
113
119
  ## How it works
114
120
 
115
- ```mermaid
116
- flowchart LR
117
- run["ssh-keyup"] --> check["check connection"]
118
- check --> gen["generate ed25519 key<br/>~/.ssh/id_ed25519_mypi"]
119
- gen --> deploy["deploy public key<br/>~/.ssh/authorized_keys<br/>or /user/ssh-keys on RouterOS"]
120
- deploy --> config["update ssh config<br/>~/.ssh/config"]
121
+ ```text
122
+ local remote
123
+ check connection -------- SSH port --------> sshd
124
+ generate key ~/.ssh/id_ed25519_mypi
125
+ deploy public key -------- public key ------> ~/.ssh/authorized_keys
126
+ update ssh config ~/.ssh/config
121
127
  ```
122
128
 
123
129
  ## Features
124
130
 
125
131
  - Works on **Windows OpenSSH**, where `ssh-copy-id` does not exist
126
132
  - **Never touches your password**. Only the public key is piped over SSH and OpenSSH prompts for the password itself
127
- - One **Ed25519** key per device (`~/.ssh/id_ed25519_<alias>`), not one key reused everywhere
133
+ - **Separate key per device** (`~/.ssh/id_ed25519_<alias>`), Ed25519 by default or RSA with `--key-type rsa`
128
134
  - Deploys in a **single SSH session**, one password prompt total
129
- - Adds a named entry to `~/.ssh/config`, works instantly with `ssh <alias>` and VSCode Remote SSH
135
+ - Adds a named entry to `~/.ssh/config`, works instantly with `ssh <alias>` and VS Code Remote SSH
130
136
  - Checks host is **reachable** first, so typos surface before keys exist
131
137
  - Detects **RouterOS** and imports the key its way
132
- - Recovers from **host key mismatches** after a reflash
138
+ - Recovers from **host key mismatches** and stale SSH config entries after a reflash
133
139
  - **Entry management**, list or retire devices without leaving stale keys behind
134
140
  - **Zero dependencies**, standard library plus system OpenSSH
135
141
 
136
142
  ## FAQ
137
143
 
138
- ### Why not do it by hand?
144
+ ### How do I set up passwordless SSH from Windows by hand?
139
145
 
140
- Usual commands for passwordless SSH from Windows:
146
+ Usual commands:
141
147
 
142
148
  ```powershell
143
149
  ssh-keygen -t ed25519
@@ -147,15 +153,15 @@ notepad $env:USERPROFILE\.ssh\config # then add a Host block by hand
147
153
 
148
154
  Works once. Same key lands on every device, `~/.ssh` keeps default permissions that sshd may reject and each new device means another config edit.
149
155
 
150
- ### Why not ssh-copy-id?
156
+ ### Is there ssh-copy-id for Windows?
151
157
 
152
- `ssh-copy-id` appends a key to `authorized_keys` and stops there. Windows OpenSSH does not ship it at all and RouterOS has no `authorized_keys` to append to.
158
+ Not built in. Windows OpenSSH does not ship it and RouterOS has no `authorized_keys` for it to append to. `ssh-keyup` covers both as an `ssh-copy-id` alternative:
153
159
 
154
160
  | | ssh-keyup | ssh-copy-id |
155
161
  |---|:---:|:---:|
156
162
  | Works on Windows OpenSSH | yes | no |
157
163
  | Works with RouterOS | yes | no |
158
- | Ed25519 key per device | yes | no |
164
+ | Separate key per device | yes | no |
159
165
  | Sets `authorized_keys` permissions | yes | yes |
160
166
  | Writes `~/.ssh/config` alias | yes | no |
161
167
  | Recovers from changed host key | yes | no |
@@ -183,7 +189,11 @@ No. It deletes local key pair and `~/.ssh/config` entry. Line in the device's `a
183
189
 
184
190
  ### What devices are supported?
185
191
 
186
- Any Linux device reachable over SSH: Raspberry Pi, NVIDIA Jetson, Orange Pi, VMs, servers. Any RouterOS 7.12 or newer device, MikroTik routers or CHR alike, is detected from SSH banner and gets its own key import, `--os routeros` forces it.
192
+ Any Linux device reachable over SSH: Raspberry Pi, NVIDIA Jetson, Orange Pi, VMs, servers. Any distribution works (Raspberry Pi OS, DietPi, Ubuntu and others). Any RouterOS 7.12 or newer device, MikroTik routers or CHR alike, is detected from SSH banner and gets its own key import, `--os routeros` forces it.
193
+
194
+ ### Can I use an RSA key instead of Ed25519?
195
+
196
+ Yes. `--key-type rsa` generates a 4096-bit RSA key for devices or policies that will not take Ed25519. Keys carry their type in the name, `id_ed25519_mypi` or `id_rsa_mypi`, so switching type for an alias leaves the old key alone and ssh-keyup offers to delete it once the new one is verified working.
187
197
 
188
198
  ### How do I add an SSH key to a MikroTik router from Windows?
189
199
 
@@ -15,6 +15,11 @@ Tired of juggling `ssh-keygen`, `ssh-copy-id` (missing on Windows) and `~/.ssh/c
15
15
 
16
16
  ## Quickstart
17
17
 
18
+ Needs **Python 3.8+** and OpenSSH tools (`ssh`, `ssh-keygen`) in PATH:
19
+
20
+ - **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).
21
+ - **Linux**: `sudo apt install python3 openssh-client` (usually pre-installed).
22
+
18
23
  Install globally with pip:
19
24
 
20
25
  ```bash
@@ -44,9 +49,9 @@ Follow prompts, enter remote password once and you're done. Alias now works in a
44
49
  ssh mypi # no password, ever again
45
50
  ```
46
51
 
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:
52
+ **VS Code:** [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
53
 
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)
54
+ ![VS Code connecting to the mypi alias over Remote SSH without a password.](https://raw.githubusercontent.com/Kurokesu/ssh-keyup/main/docs/demo-vscode.gif)
50
55
 
51
56
  ## Usage
52
57
 
@@ -58,7 +63,7 @@ ssh-keyup pi@192.168.1.23:2222 mypi # non-default SSH port
58
63
  ssh-keyup admin@192.168.88.1 router # RouterOS, detected automatically
59
64
  ```
60
65
 
61
- Flags (`--host`, `--user`, `--alias`, `--port`, `--os`) work too, see `ssh-keyup --help`
66
+ Flags (`--host`, `--user`, `--alias`, `--port`, `--os`, `--key-type`) work too, see `ssh-keyup --help`
62
67
 
63
68
  ### Set up a fleet
64
69
 
@@ -77,41 +82,34 @@ ssh-keyup --list
77
82
  ssh-keyup --remove mypi # deletes its key pair too
78
83
  ```
79
84
 
80
- ## Prerequisites
81
-
82
- **Python 3.8+** and OpenSSH tools (`ssh`, `ssh-keygen`) in PATH.
83
-
84
- - **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).
85
- - **Linux**: `sudo apt install python3 openssh-client` (usually pre-installed).
86
-
87
85
  ## How it works
88
86
 
89
- ```mermaid
90
- flowchart LR
91
- run["ssh-keyup"] --> check["check connection"]
92
- check --> gen["generate ed25519 key<br/>~/.ssh/id_ed25519_mypi"]
93
- gen --> deploy["deploy public key<br/>~/.ssh/authorized_keys<br/>or /user/ssh-keys on RouterOS"]
94
- deploy --> config["update ssh config<br/>~/.ssh/config"]
87
+ ```text
88
+ local remote
89
+ check connection -------- SSH port --------> sshd
90
+ generate key ~/.ssh/id_ed25519_mypi
91
+ deploy public key -------- public key ------> ~/.ssh/authorized_keys
92
+ update ssh config ~/.ssh/config
95
93
  ```
96
94
 
97
95
  ## Features
98
96
 
99
97
  - Works on **Windows OpenSSH**, where `ssh-copy-id` does not exist
100
98
  - **Never touches your password**. Only the public key is piped over SSH and OpenSSH prompts for the password itself
101
- - One **Ed25519** key per device (`~/.ssh/id_ed25519_<alias>`), not one key reused everywhere
99
+ - **Separate key per device** (`~/.ssh/id_ed25519_<alias>`), Ed25519 by default or RSA with `--key-type rsa`
102
100
  - Deploys in a **single SSH session**, one password prompt total
103
- - Adds a named entry to `~/.ssh/config`, works instantly with `ssh <alias>` and VSCode Remote SSH
101
+ - Adds a named entry to `~/.ssh/config`, works instantly with `ssh <alias>` and VS Code Remote SSH
104
102
  - Checks host is **reachable** first, so typos surface before keys exist
105
103
  - Detects **RouterOS** and imports the key its way
106
- - Recovers from **host key mismatches** after a reflash
104
+ - Recovers from **host key mismatches** and stale SSH config entries after a reflash
107
105
  - **Entry management**, list or retire devices without leaving stale keys behind
108
106
  - **Zero dependencies**, standard library plus system OpenSSH
109
107
 
110
108
  ## FAQ
111
109
 
112
- ### Why not do it by hand?
110
+ ### How do I set up passwordless SSH from Windows by hand?
113
111
 
114
- Usual commands for passwordless SSH from Windows:
112
+ Usual commands:
115
113
 
116
114
  ```powershell
117
115
  ssh-keygen -t ed25519
@@ -121,15 +119,15 @@ notepad $env:USERPROFILE\.ssh\config # then add a Host block by hand
121
119
 
122
120
  Works once. Same key lands on every device, `~/.ssh` keeps default permissions that sshd may reject and each new device means another config edit.
123
121
 
124
- ### Why not ssh-copy-id?
122
+ ### Is there ssh-copy-id for Windows?
125
123
 
126
- `ssh-copy-id` appends a key to `authorized_keys` and stops there. Windows OpenSSH does not ship it at all and RouterOS has no `authorized_keys` to append to.
124
+ Not built in. Windows OpenSSH does not ship it and RouterOS has no `authorized_keys` for it to append to. `ssh-keyup` covers both as an `ssh-copy-id` alternative:
127
125
 
128
126
  | | ssh-keyup | ssh-copy-id |
129
127
  |---|:---:|:---:|
130
128
  | Works on Windows OpenSSH | yes | no |
131
129
  | Works with RouterOS | yes | no |
132
- | Ed25519 key per device | yes | no |
130
+ | Separate key per device | yes | no |
133
131
  | Sets `authorized_keys` permissions | yes | yes |
134
132
  | Writes `~/.ssh/config` alias | yes | no |
135
133
  | Recovers from changed host key | yes | no |
@@ -157,7 +155,11 @@ No. It deletes local key pair and `~/.ssh/config` entry. Line in the device's `a
157
155
 
158
156
  ### What devices are supported?
159
157
 
160
- Any Linux device reachable over SSH: Raspberry Pi, NVIDIA Jetson, Orange Pi, VMs, servers. Any RouterOS 7.12 or newer device, MikroTik routers or CHR alike, is detected from SSH banner and gets its own key import, `--os routeros` forces it.
158
+ Any Linux device reachable over SSH: Raspberry Pi, NVIDIA Jetson, Orange Pi, VMs, servers. Any distribution works (Raspberry Pi OS, DietPi, Ubuntu and others). Any RouterOS 7.12 or newer device, MikroTik routers or CHR alike, is detected from SSH banner and gets its own key import, `--os routeros` forces it.
159
+
160
+ ### Can I use an RSA key instead of Ed25519?
161
+
162
+ Yes. `--key-type rsa` generates a 4096-bit RSA key for devices or policies that will not take Ed25519. Keys carry their type in the name, `id_ed25519_mypi` or `id_rsa_mypi`, so switching type for an alias leaves the old key alone and ssh-keyup offers to delete it once the new one is verified working.
161
163
 
162
164
  ### How do I add an SSH key to a MikroTik router from Windows?
163
165
 
@@ -7,3 +7,8 @@ build-backend = "setuptools.build_meta"
7
7
  line-length = 79
8
8
  # match python_requires, keeps fixes runtime safe on old Pythons
9
9
  target-version = "py38"
10
+
11
+ [tool.pytest.ini_options]
12
+ # plain pytest runs unit tests only
13
+ addopts = "-m 'not integration'"
14
+ markers = ["integration: drives a live SSH target"]
@@ -1,7 +1,7 @@
1
1
  [metadata]
2
2
  name = ssh-keyup
3
3
  version = attr: ssh_keyup.__version__
4
- description = Passwordless SSH setup and ssh-copy-id alternative for any Linux or RouterOS device, such as Raspberry Pi, NVIDIA Jetson or MikroTik routers
4
+ description = Passwordless SSH from Windows or Linux to Raspberry Pi, NVIDIA Jetson, MikroTik routers and other Linux or RouterOS devices. One command, no ssh-copy-id needed
5
5
  long_description = file: README.md
6
6
  long_description_content_type = text/markdown
7
7
  author = UAB Kurokesu
@@ -12,7 +12,7 @@ project_urls =
12
12
  Repository = https://github.com/Kurokesu/ssh-keyup
13
13
  Issues = https://github.com/Kurokesu/ssh-keyup/issues
14
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, mikrotik, routeros, iot, automation, vscode, remote-ssh, windows, linux
15
+ keywords = ssh, ssh-key, ssh-keys, ssh-config, ssh-copy-id, authorized-keys, passwordless-ssh, openssh, ed25519, rsa, raspberry-pi, raspberrypi, rpi, jetson, nvidia-jetson, orange-pi, dietpi, mikrotik, routeros, iot, automation, vscode, remote-ssh, windows, linux
16
16
  classifiers =
17
17
  Development Status :: 5 - Production/Stable
18
18
  Environment :: Console
@@ -21,6 +21,14 @@ classifiers =
21
21
  Operating System :: Microsoft :: Windows
22
22
  Operating System :: POSIX :: Linux
23
23
  Programming Language :: Python :: 3
24
+ Programming Language :: Python :: 3.8
25
+ Programming Language :: Python :: 3.9
26
+ Programming Language :: Python :: 3.10
27
+ Programming Language :: Python :: 3.11
28
+ Programming Language :: Python :: 3.12
29
+ Programming Language :: Python :: 3.13
30
+ Programming Language :: Python :: 3.14
31
+ Topic :: Security
24
32
  Topic :: System :: Networking
25
33
  Topic :: System :: Systems Administration
26
34
  Topic :: Utilities
@@ -1,14 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ssh-keyup
3
- Version: 1.3.0
4
- Summary: Passwordless SSH setup and ssh-copy-id alternative for any Linux or RouterOS device, such as Raspberry Pi, NVIDIA Jetson or MikroTik routers
3
+ Version: 1.4.0
4
+ Summary: Passwordless SSH from Windows or Linux to Raspberry Pi, NVIDIA Jetson, MikroTik routers and other Linux or RouterOS devices. One command, no ssh-copy-id needed
5
5
  Home-page: https://github.com/Kurokesu/ssh-keyup
6
6
  Author: UAB Kurokesu
7
7
  License: GPL-3.0-or-later
8
8
  Project-URL: Repository, https://github.com/Kurokesu/ssh-keyup
9
9
  Project-URL: Issues, https://github.com/Kurokesu/ssh-keyup/issues
10
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,mikrotik,routeros,iot,automation,vscode,remote-ssh,windows,linux
11
+ Keywords: ssh,ssh-key,ssh-keys,ssh-config,ssh-copy-id,authorized-keys,passwordless-ssh,openssh,ed25519,rsa,raspberry-pi,raspberrypi,rpi,jetson,nvidia-jetson,orange-pi,dietpi,mikrotik,routeros,iot,automation,vscode,remote-ssh,windows,linux
12
12
  Classifier: Development Status :: 5 - Production/Stable
13
13
  Classifier: Environment :: Console
14
14
  Classifier: Intended Audience :: Developers
@@ -16,6 +16,14 @@ Classifier: Intended Audience :: System Administrators
16
16
  Classifier: Operating System :: Microsoft :: Windows
17
17
  Classifier: Operating System :: POSIX :: Linux
18
18
  Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.8
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Programming Language :: Python :: 3.14
26
+ Classifier: Topic :: Security
19
27
  Classifier: Topic :: System :: Networking
20
28
  Classifier: Topic :: System :: Systems Administration
21
29
  Classifier: Topic :: Utilities
@@ -41,6 +49,11 @@ Tired of juggling `ssh-keygen`, `ssh-copy-id` (missing on Windows) and `~/.ssh/c
41
49
 
42
50
  ## Quickstart
43
51
 
52
+ Needs **Python 3.8+** and OpenSSH tools (`ssh`, `ssh-keygen`) in PATH:
53
+
54
+ - **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).
55
+ - **Linux**: `sudo apt install python3 openssh-client` (usually pre-installed).
56
+
44
57
  Install globally with pip:
45
58
 
46
59
  ```bash
@@ -70,9 +83,9 @@ Follow prompts, enter remote password once and you're done. Alias now works in a
70
83
  ssh mypi # no password, ever again
71
84
  ```
72
85
 
73
- **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:
86
+ **VS Code:** [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:
74
87
 
75
- ![VSCode connecting to the mypi alias over Remote SSH without a password.](https://raw.githubusercontent.com/Kurokesu/ssh-keyup/main/docs/demo-vscode.gif)
88
+ ![VS Code connecting to the mypi alias over Remote SSH without a password.](https://raw.githubusercontent.com/Kurokesu/ssh-keyup/main/docs/demo-vscode.gif)
76
89
 
77
90
  ## Usage
78
91
 
@@ -84,7 +97,7 @@ ssh-keyup pi@192.168.1.23:2222 mypi # non-default SSH port
84
97
  ssh-keyup admin@192.168.88.1 router # RouterOS, detected automatically
85
98
  ```
86
99
 
87
- Flags (`--host`, `--user`, `--alias`, `--port`, `--os`) work too, see `ssh-keyup --help`
100
+ Flags (`--host`, `--user`, `--alias`, `--port`, `--os`, `--key-type`) work too, see `ssh-keyup --help`
88
101
 
89
102
  ### Set up a fleet
90
103
 
@@ -103,41 +116,34 @@ ssh-keyup --list
103
116
  ssh-keyup --remove mypi # deletes its key pair too
104
117
  ```
105
118
 
106
- ## Prerequisites
107
-
108
- **Python 3.8+** and OpenSSH tools (`ssh`, `ssh-keygen`) in PATH.
109
-
110
- - **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).
111
- - **Linux**: `sudo apt install python3 openssh-client` (usually pre-installed).
112
-
113
119
  ## How it works
114
120
 
115
- ```mermaid
116
- flowchart LR
117
- run["ssh-keyup"] --> check["check connection"]
118
- check --> gen["generate ed25519 key<br/>~/.ssh/id_ed25519_mypi"]
119
- gen --> deploy["deploy public key<br/>~/.ssh/authorized_keys<br/>or /user/ssh-keys on RouterOS"]
120
- deploy --> config["update ssh config<br/>~/.ssh/config"]
121
+ ```text
122
+ local remote
123
+ check connection -------- SSH port --------> sshd
124
+ generate key ~/.ssh/id_ed25519_mypi
125
+ deploy public key -------- public key ------> ~/.ssh/authorized_keys
126
+ update ssh config ~/.ssh/config
121
127
  ```
122
128
 
123
129
  ## Features
124
130
 
125
131
  - Works on **Windows OpenSSH**, where `ssh-copy-id` does not exist
126
132
  - **Never touches your password**. Only the public key is piped over SSH and OpenSSH prompts for the password itself
127
- - One **Ed25519** key per device (`~/.ssh/id_ed25519_<alias>`), not one key reused everywhere
133
+ - **Separate key per device** (`~/.ssh/id_ed25519_<alias>`), Ed25519 by default or RSA with `--key-type rsa`
128
134
  - Deploys in a **single SSH session**, one password prompt total
129
- - Adds a named entry to `~/.ssh/config`, works instantly with `ssh <alias>` and VSCode Remote SSH
135
+ - Adds a named entry to `~/.ssh/config`, works instantly with `ssh <alias>` and VS Code Remote SSH
130
136
  - Checks host is **reachable** first, so typos surface before keys exist
131
137
  - Detects **RouterOS** and imports the key its way
132
- - Recovers from **host key mismatches** after a reflash
138
+ - Recovers from **host key mismatches** and stale SSH config entries after a reflash
133
139
  - **Entry management**, list or retire devices without leaving stale keys behind
134
140
  - **Zero dependencies**, standard library plus system OpenSSH
135
141
 
136
142
  ## FAQ
137
143
 
138
- ### Why not do it by hand?
144
+ ### How do I set up passwordless SSH from Windows by hand?
139
145
 
140
- Usual commands for passwordless SSH from Windows:
146
+ Usual commands:
141
147
 
142
148
  ```powershell
143
149
  ssh-keygen -t ed25519
@@ -147,15 +153,15 @@ notepad $env:USERPROFILE\.ssh\config # then add a Host block by hand
147
153
 
148
154
  Works once. Same key lands on every device, `~/.ssh` keeps default permissions that sshd may reject and each new device means another config edit.
149
155
 
150
- ### Why not ssh-copy-id?
156
+ ### Is there ssh-copy-id for Windows?
151
157
 
152
- `ssh-copy-id` appends a key to `authorized_keys` and stops there. Windows OpenSSH does not ship it at all and RouterOS has no `authorized_keys` to append to.
158
+ Not built in. Windows OpenSSH does not ship it and RouterOS has no `authorized_keys` for it to append to. `ssh-keyup` covers both as an `ssh-copy-id` alternative:
153
159
 
154
160
  | | ssh-keyup | ssh-copy-id |
155
161
  |---|:---:|:---:|
156
162
  | Works on Windows OpenSSH | yes | no |
157
163
  | Works with RouterOS | yes | no |
158
- | Ed25519 key per device | yes | no |
164
+ | Separate key per device | yes | no |
159
165
  | Sets `authorized_keys` permissions | yes | yes |
160
166
  | Writes `~/.ssh/config` alias | yes | no |
161
167
  | Recovers from changed host key | yes | no |
@@ -183,7 +189,11 @@ No. It deletes local key pair and `~/.ssh/config` entry. Line in the device's `a
183
189
 
184
190
  ### What devices are supported?
185
191
 
186
- Any Linux device reachable over SSH: Raspberry Pi, NVIDIA Jetson, Orange Pi, VMs, servers. Any RouterOS 7.12 or newer device, MikroTik routers or CHR alike, is detected from SSH banner and gets its own key import, `--os routeros` forces it.
192
+ Any Linux device reachable over SSH: Raspberry Pi, NVIDIA Jetson, Orange Pi, VMs, servers. Any distribution works (Raspberry Pi OS, DietPi, Ubuntu and others). Any RouterOS 7.12 or newer device, MikroTik routers or CHR alike, is detected from SSH banner and gets its own key import, `--os routeros` forces it.
193
+
194
+ ### Can I use an RSA key instead of Ed25519?
195
+
196
+ Yes. `--key-type rsa` generates a 4096-bit RSA key for devices or policies that will not take Ed25519. Keys carry their type in the name, `id_ed25519_mypi` or `id_rsa_mypi`, so switching type for an alias leaves the old key alone and ssh-keyup offers to delete it once the new one is verified working.
187
197
 
188
198
  ### How do I add an SSH key to a MikroTik router from Windows?
189
199