diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-01-29 09:09:52 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-01-29 10:16:18 +0100 |
commit | 8979c546bd343c9d68f42bf1215cb1721a7c3206 (patch) | |
tree | 66c084c4f9e13ea10cac8967bd8f2d19a29ad68b /op-mode-definitions/generate-ssh-server-key.xml.in | |
parent | 74c48d91770faaaf6bc55d05f7d5e08d79f71196 (diff) | |
download | vyos-1x-8979c546bd343c9d68f42bf1215cb1721a7c3206.tar.gz vyos-1x-8979c546bd343c9d68f42bf1215cb1721a7c3206.zip |
op-mode: ssh: support generating client keypair
vyos@vyos:~$ generate ssh client-key /config/auth/id_rsa_rpki
Generating public/private rsa key pair.
Your identification has been saved in /config/auth/id_rsa_rpki.
Your public key has been saved in /config/auth/id_rsa_rpki.pub.
The key fingerprint is:
SHA256:aBMN1F6lINh4CbG/fuEVReCpbZr3U0/KdorWY6iGfvw vyos@vyos
The key's randomart image is:
+---[RSA 2048]----+
| oB+o. .+o |
| o.++.o.o. |
| ......+. |
| . o.o. |
| = S o. |
| . o.+. . .|
| ..o=. = + |
| . +.+.+.B o|
| .o.o.+E+.+ |
+----[SHA256]-----+
Diffstat (limited to 'op-mode-definitions/generate-ssh-server-key.xml.in')
-rw-r--r-- | op-mode-definitions/generate-ssh-server-key.xml.in | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/op-mode-definitions/generate-ssh-server-key.xml.in b/op-mode-definitions/generate-ssh-server-key.xml.in index a6ebf1b78..86bb1b1bd 100644 --- a/op-mode-definitions/generate-ssh-server-key.xml.in +++ b/op-mode-definitions/generate-ssh-server-key.xml.in @@ -2,14 +2,30 @@ <interfaceDefinition> <node name="generate"> <properties> - <help>Generate an object</help> + <help>Generate an object/key</help> </properties> <children> - <node name="ssh-server-key"> + <node name="ssh"> <properties> - <help>Regenerate the host SSH keys and restart the SSH server</help> + <help>Generate SSH related keypairs</help> </properties> - <command>${vyos_op_scripts_dir}/generate_ssh_server_key.py</command> + <children> + <node name="server-key"> + <properties> + <help>Re-generate SSH host keys and restart SSH server</help> + </properties> + <command>${vyos_op_scripts_dir}/generate_ssh_server_key.py</command> + </node> + <tagNode name="client-key"> + <properties> + <help>Re-generate SSH client keypair</help> + <completionHelp> + <list><filename></list> + </completionHelp> + </properties> + <command>ssh-keygen -t rsa -f "$4" -N ""</command> + </tagNode> + </children> </node> </children> </node> |