# NTP Authentication

NTP authentication can be configured, although it is optional.

It allwos NTP clients to ensure they only sync to the intended servers.

To configure NTP authentication:

1. `ntp authenticate` - enable NTP authentication
2. `ntp autentication-key <key-number> md5 <key>` - create the NTP authentication key(s).
3. `ntp trusted-key <key-number>` - specify the trusted key(s)
4. `ntp server <ip-address> key <key-number>` - specify which key to use for the server. This command isn't needed on the server (R1).

<figure><img src="https://1474932522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAgItg4KAZpnXjAFPWRf8%2Fuploads%2FDfrNeo1QAvFoSSpQQfkB%2FScreenshot%20from%202023-07-31%2018-07-45.png?alt=media&#x26;token=fa9416a9-8380-454d-bd91-afbfed1abbb9" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1474932522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAgItg4KAZpnXjAFPWRf8%2Fuploads%2F0vNKDylo6Xf5VR91DCuC%2FScreenshot%20from%202023-07-31%2018-08-46.png?alt=media&#x26;token=36324e35-1b45-4c00-8e96-1c0f82e0c75c" alt=""><figcaption></figcaption></figure>
