Wireguard "client" interface with existing keypair?

Hi All,

I am trying to configure a Wireguard interface as a “client” to a server that has provided a pre generated keypair.

I have set the private-key setting on the interface with the encoded key provided from the server.

set interfaces wireguard wg0 private-key gybbeligoggybeligog=

But when i commit the config i get the error:

Wireguard private-key not found! Execute: “run generate wireguard [default-keypair|named-keypairs]”

Is it really not possible to configure wireguard with keys that are not generated by the generate wireguard named-keypairs command ?

You can replace your named private key.

vyos@r4-roll# run generate wireguard named-keypairs foo
vyos@r4-roll# ls /config/auth/wireguard/foo/
private.key  public.key

vyos@r4-roll# set interfaces wireguard wg0 private-key 
Possible completions:
   <text>       Private key to use on that interface

That worked. Thanks for for the crazy quick reply.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.