Rolling out the certificates

If you are rolling this out to Windows devices, then you will need to convert your PEM and CRT files into the PFX format using the following command, replacing <CertificateAndKeyName> and <CertificateName> with the respective file names:

openssl pkcs12 \
-inkey <CertificateAndKeyName>.pem \
-in <CertificateAndKeyName>.crt \
-export \
-out <CertificateName>.pfx

The resulting PFX certificate can be rolled out into the local machine certificate storage of the target devices using your endpoint management solution. After the rollout, the certificate should show up in the Certificates Manager for the local computer (search for Manage computer certificates) inside the Personal ➜ Certificates folder.

PowerShell calls this location:

 cert:\LocalMachine\My

 

To minimize access to the private key, restrict permissions to the SYSTEM account and only the necessary administrator accounts. You can verify this in the Certificates Manager for the local computer by right-clicking the certificate, selecting All Tasks, then Manage Private Keys…, and confirming that only the required accounts have access.

If you are rolling this out to Linux devices, no changes are required. You should place the private keys PEM into /etc/teamviewer/ssl/private and the public certificates CRT into /etc/teamviewer/ssl/certs. Make sure that both the public certificate and corresponding private key have the same base filename, for example, <CertificateAndKeyName>.pem and <CertificateAndKeyName>.crt. Please ensure that the root is the owner of the private key file. It is recommended to minimize access to the root itself.

Testing and applying the policy

As the setup process for this feature is complicated, this setup should be tested before it is fully rolled out to other devices. This can be tested by installing the certificate on a local device and applying the policy to the same device, then starting a remote control session, starting a recording, and verifying that the file is successfully uploaded to the SFTP server after the recording has stopped. This confirms that the encryption, decryption, and SFTP setup, as well as the connection to the server from the uploading device, are working.

If an upload fails, the upload will be retried after a short period of time, increasing with every subsequent failed attempt up to an hour. The timeout will reduce the number of erroneous requests to the SFTP server. Especially during testing, when the configuration is still actively adapted, the next retry may not be immediately after a recording has stopped. To attempt another upload immediately, a full TeamViewer restart can be performed (for example, by rebooting the computer).

Once the test is successful, first roll out the certificate to all target devices using your endpoint management solution, then apply the policy to those devices. Once these devices record any remote control sessions, all recordings from these devices will automatically be uploaded to your server.