Page MenuHomeVyOS Platform

pki : the file command 'generate pki wireguard key-pair file' is not working
Closed, ResolvedPublicBUG

Description

the file is not created in the current directory or the specified path

vyos@test02:~$ pwd
/home/vyos/

vyos@test02:~$ generate pki wireguard key-pair file keys
Private key: yBYwlvYSgO+6hV9jercjsASBsykIcnbtzz4EziWVSWM=
Public key: rs4I7Zj6RI2P/7az5LdNqi6p707cXrCKzFAKNaPP6RE=
vyos@test02:~$ ls -ltr
total 0
vyos@test02:~$ generate pki wireguard key-pair file /home/vyos/keys1
Private key: uNFNkSeLZ5LkSUsN2ryHVuSvmwkxtymlk/vIvkX8/Uc=
Public key: ojYjp61lTEvVwuRPsoXOK7f4K8+TLJpjzgO7mksjCT0=
vyos@test02:~$ ls -ltr /home/vyos
total 0

Tested for openvpn and key-pair where the files are created in this path /config/auth

Do you want to encrypt the private key with a passphrase? [y/N] N
File written to /config/auth/vyos1.pem
File written to /config/auth/vyos1.key

------
vyos@test02:~$ generate pki openvpn shared-secret file test
File written to /config/auth/test.key

Details

Difficulty level
Easy (less than an hour)
Version
1.4-rolling-202109071434,
Why the issue appeared?
Implementation mistake
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

c-po closed this task as Resolved.EditedSep 9 2021, 2:50 PM
c-po claimed this task.
c-po triaged this task as Low priority.
c-po changed Difficulty level from Unknown (require assessment) to Easy (less than an hour).
c-po changed Why the issue appeared? from Will be filled on close to Implementation mistake.
c-po changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.
c-po changed Issue type from Unspecified (please specify) to Bug (incorrect behavior).
[email protected]:~$ generate pki wireguard key-pair file test
Private key: QG039BeDoy2MXKxQwFRhYYea7B50crYvZ1RUn+N0c3A=
Public key: iXVG4GSHc0O7NHgX47DhhNO/WWSTZS83/eF2z4GHYSE=
File written to /config/auth/test_public.key
File written to /config/auth/test_private.key

Writing the WireGuard keys to a file makes less sense to me - the question is if we really need this option?