Uploading OpenVPN Client .crt and .key via ssh/scp

I have a few hundred RUT241’s running RUT2M_R_00.07.06.10. These have a OpenVPN Client and I need to modify OpenVPN client’s .crt and .key via command line, how can I it? It needs to be a ssh/scp solution!

Thank you.

Hello,

To modify your OpenVPN client’s certificate or key files through SSH, follow these steps:

  1. Connect to the Router’s CLI: Access the router’s command line interface via SSH. Once connected, locate the paths for your client certificate and key files by running:
cat /etc/config/openvpn

Look for the option key and option cert parameters in the output—these will show you the paths to the certificate and key files on the router. Copy these paths for use in the next step.

  1. Edit the Files: Using the paths you identified, you can edit the certificate or key files with the following command format:
vi /etc/<path>

For example, it might look something like this:

vi /etc/vuci-uploads/cbid.openvpn.client.certclient.cert__1_.pem

In the vi editor, press i to enter insert mode and make your changes. Once done, press Esc and type :wq to save and exit.

Best Regards,

Hi,

Perfect, it works!

Thanks for your reply.

Hello,

Great to hear that it worked! If you have any further questions or need additional assistance, feel free to reach out.

Best regards,

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