News
Faster Speeds: Bandwidth for vStack Servers in Kazakhstan Increased to 200 Mbps
WT
February 1 2023
Updated June 30 2025

How to Configure PSK Encryption for Zabbix Agent on Ubuntu and Windows

Monitoring Security Zabbix

Zabbix includes built-in encryption capabilities that allow secure communication between its components using either Pre-Shared Keys (PSK) or SSL certificates. Implementing encryption helps protect sensitive monitoring data from unauthorized access or tampering. In this guide, we’ll focus on configuring PSK encryption for Zabbix agents to ensure secure and authenticated data exchange between agents and the Zabbix server.

Configuring the server

First, let's configure the encryption mode of the host we want to use.

Open the web interface, go to Configuration -> Hosts, go to the host you want to configure PSK for, and open the Encryption tab. By default all connections are unencrypted, unmark that checkbox and choose the PSK option.

In the ‘PSK identity’ line write an ID for your key. After that create a key with any password generator of your choosing or use your own, then put it in the PSK line. Click Update.

1 host conf

Configuring PSK keys on the Ubuntu agent

Now we need to make a .psk file for storing the key accessible for the agent user, /etc/zabbix/zabbix_agentd.psk for example, paste your password inside the file.

Give Zabbix acces to it:

sudo chown zabbix:zabbix /etc/zabbix/zabbix_agentd.psk
sudo chmod 400 /etc/zabbix/zabbix_agentd.psk

Delete # symbol from the TLSConnect and TLSAccept lines, change their value to psk, and after that edit these lines to the end of the file:

TLSPSKFile=(path to key file)
TLSPSKIdentity=(ID of your key)

5 PSK conf2

4 PSK conf

Restart the agent for the changes to take place.

Configuring PSK for the Windows agent

For the Windows version modify C:\\\\Program Files\\\\Zabbix Agent\\\\zabbix_agentd.conf file in the same way as those described earlier in the Ubuntu part.

Make zabbix_agentd.psk file in the default agent folder with your PSK in it.

Don't forget to restart the agent in the services menu.

5.5 win reset

Check if it works.

6 checking if works

Conclusion

In this guide, we explored how to configure PSK (Pre-Shared Key) authorization for Zabbix agents running on both Windows and Ubuntu. By enabling encrypted communication between the agents and the Zabbix server, you enhance the overall security of your monitoring infrastructure.
We covered how to generate and manage PSK keys, modify the agent configuration files, and verify that the connection is securely established. With these steps, your Zabbix deployment becomes more resilient to unauthorized access and data interception.

Vote:
5 out of 5
Аverage rating : 5
Rated by: 2
1101 CT Amsterdam The Netherlands, Herikerbergweg 292
+31 20 262-58-98
700 300
ITGLOBAL.COM NL
700 300

You might also like...

We use cookies to make your experience on the Serverspace better. By continuing to browse our website, you agree to our
Use of Cookies and Privacy Policy.