Syslog Server Configuration on a Linux System
A secure Junos OS environment requires auditing of events and storing them in a local audit file. The recorded events are simultaneously sent to an external syslog server. A syslog server receives the syslog messages streamed from the device. The syslog server must have an SSHv2 client with NETCONF 1.0 support configured to receive the streamed syslog messages. Junos OS supports NETCONF implemention as defined by RFC6241 (NETCONF) and RFC6242 (Using NETCONF protocol over SSH).
Use the configuration details and establish a session between the target of evaluation (TOE) and the audit server. Examine the traffic that passes between the audit server and the TOE during several activities, and the generated audit data to be transferred to the audit server.
Configuring Event Logging to a Remote Server when Initiating the Connection from the Remote Server
The remote syslog server functions as a host and includes an ssh server along with ssh utilities such as ssh-keygen, ssh-agent, and ssh-add.
The following procedure describes the steps to configure event logging to a remote server when the SSH connection to the TOE is initiated from the remote syslog server.
The following output shows test log results for syslog-server.
root@host:~ #ssh-keygen -t ecdsa -f $HOME/.ssh/id_ssh_toby_ecdsa_521 -N "" -b 521 Generating public/private ecdsa key pair. /root/.ssh/id_ssh_toby_ecdsa_521 already exists. Overwrite (y/n)? Your identification has been saved in /root/.ssh/id_ssh_toby_ecdsa_521. Your public key has been saved in /root/.ssh/id_ssh_toby_ecdsa_521.pub. The key fingerprint is: SHA256:QotJZkrdOAXn9VCpDc/2S1rF+KPJW239WfQhj9sEhVA root@host.englab.juniper.net The key's randomart image is: +---[ECDSA 521]---+ | ..o o..o.E | | . * ..o. . . | | . B + *. + . | | . = = .. = . + | | . o o S. . = ..| | . + Bo+| | = =.+*| | . =.+.+| | .o o.| +----[SHA256]-----+ [root@host ~]# cat $HOME/.ssh/id_ssh_toby_ecdsa_521.pub ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAC2+AZ7GkIcl8Y9PZNZosY7vUnSR+WyS11CGpqA23toyiVcd0H7ivFsgmztwxgaM7Qla1bU2A1yEPw7tmqlR5k8FQAKsbSHzzRsVGXO24wg9gpu/Mxu5l3aXMtodhIYns66WwI7U/rjQsKosqwkvizep2wUtQ49DuQIXO0vc3mPNAa1DA== root@host.englab.juniper.net [root@host ~]# eval `ssh-agent -s` Agent pid 5978 [root@host ~]# ssh-add ~/ .ssh/id_ssh_toby_ecdsa_521 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0755 for '/root/' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored. Identity added: .ssh/id_ssh_toby_ecdsa_521 (.ssh/id_ssh_toby_ecdsa_521)
Net configuration channel
[root@host ~]# ssh syslog-mon@nms-qfx5120-48ym -s netconf
<!-- No zombies were killed during the creation of this user interface -->
<!-- user syslog-mon, class j-super-user -->
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>urn:ietf:params:netconf:base:1.0</capability>
<capability>urn:ietf:params:netconf:capability:candidate:1.0</capability>
<capability>urn:ietf:params:netconf:capability:confirmed-commit:1.0</capability>
<capability>urn:ietf:params:netconf:capability:validate:1.0</capability>
<capability>urn:ietf:params:netconf:capability:url:1.0?scheme=http,ftp,file</capability>
<capability>urn:ietf:params:xml:ns:netconf:base:1.0</capability>
<capability>urn:ietf:params:xml:ns:netconf:capability:candidate:1.0</capability>
<capability>urn:ietf:params:xml:ns:netconf:capability:confirmed-commit:1.0</capability>
<capability>urn:ietf:params:xml:ns:netconf:capability:validate:1.0</capability>
<capability>urn:ietf:params:xml:ns:netconf:capability:url:1.0?scheme=http,ftp,file</capability>
<capability>urn:ietf:params:xml:ns:yang:ietf-yang-metadata?module=ietf-yang-metadata&revision=2016-08-05</capability>
<capability>urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring</capability>
<capability>http://xml.juniper.net/netconf/junos/1.0</capability>
<capability>http://xml.juniper.net/dmi/system/1.0</capability>
<capability>http://yang.juniper.net/junos/jcmd?module=junos-configuration-metadata&revision=2021-09-01&…
</capabilities>
<session-id>80506</session-id>
</hello>
]]>]]>
<rpc><get-syslog-events><stream>messages</stream></get-syslog-events></rpc>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/26.1I-20251125_dev_common.0.1234/junos">
<syslog-events>
<syslog>
Dec 4 13:49:03 2025 nms-qfx5120-48ym-test mgd[65827]: UI_COMMIT: User 'root' requested 'commit' operation (comment: none)
</syslog>
<syslog>
Dec 4 13:49:03 2025 nms-qfx5120-48ym-test ffp: "dynamic-profiles": No change to profiles
</syslog>
<syslog>
Dec 4 13:49:04 2025 nms-qfx5120-48ym-test mgd[65827]: UI_CONFIGURATION_REVISION_UPDATED: New database revision 're0-1764836343-29' and old database revision 're0-1764835976-28'
</syslog>
<syslog>
Dec 4 13:49:04 2025 nms-qfx5120-48ym-test mgd[65827]: UI_COMMIT_COMPLETED: : commit complete
</syslog>The following output shows event logs generated on the TOE that are received on the syslog server.
<190>1 2025-12-04T13:04:42.472+05:30 nms-qfx5120-48ym-test mgd 72697 UI_AUTH_EVENT [junos@2636.1.1.1.2.139 username="syslog-mon" authentication-level="j-super-user"] Authenticated user 'syslog-mon' assigned to class 'j-super-user' <190>1 2025-12-04T13:04:42.472+05:30 nms-qfx5120-48ym-test mgd 72697 UI_LOGIN_EVENT [junos@2636.1.1.1.2.139 username="syslog-mon" class-name="j-super-user" local-peer="" pid="72697" ssh-connection="10.56.212.248 37647 10.209.6.136 22" client-mode="cli"] User 'syslog-mon' login, class 'j-super-user' [72697], ssh-connection '10.56.212.248 37647 10.209.6.136 22', client-mode 'cli'
The following output shows that the local syslogs and remote syslogs received.
Local:
<38>1 2025-12-04T14:41:44.514+05:30 nms-qfx5120-48ym-test sshd 83264 - - Accepted publickey for syslog-mon from 10.56.212.248 port 24927 ssh2: ECDSA SHA256:QotJZkrdOAXn9VCpDc/2S1rF+KPJW239WfQhj9sEhVA <190>1 2025-12-04T14:41:45.461+05:30 nms-qfx5120-48ym-test mgd 83268 UI_AUTH_EVENT [junos@2636.1.1.1.2.139 username="syslog-mon" authentication-level="j-super-user"] Authenticated user 'syslog-mon' assigned to class 'j-super-user' <190>1 2025-12-04T14:41:45.461+05:30 nms-qfx5120-48ym-test mgd 83268 UI_LOGIN_EVENT [junos@2636.1.1.1.2.139 username="syslog-mon" class-name="j-super-user" local-peer="" pid="83268" ssh-connection="10.56.212.248 24927 10.209.6.136 22" client-mode="cli"] User 'syslog-mon' login, class 'j-super-user' [83268], ssh-connection '10.56.212.248 24927 10.209.6.136 22', client-mode 'cli' <190>1 2025-12-04T14:41:47.549+05:30 nms-qfx5120-48ym-test mgd 83268 UI_CMDLINE_READ_LINE [junos@2636.1.1.1.2.139 username="syslog-mon" command="edit "] User 'syslog-mon', command 'edit ' <189>1 2025-12-04T14:41:47.550+05:30 nms-qfx5120-48ym-test mgd 83268 UI_DBASE_LOGIN_EVENT [junos@2636.1.1.1.2.139 username="syslog-mon"] User 'syslog-mon' entering configuration mode <190>1 2025-12-04T14:41:51.753+05:30 nms-qfx5120-48ym-test mgd 83268 UI_CMDLINE_READ_LINE [junos@2636.1.1.1.2.139 username="syslog-mon" command="commit "] User 'syslog-mon', command 'commit ' <189>1 2025-12-04T14:41:51.754+05:30 nms-qfx5120-48ym-test mgd 83268 UI_COMMIT [junos@2636.1.1.1.2.139 username="syslog-mon" command="commit" message="none"] User 'syslog-mon' requested 'commit' operation (comment: none) <190>1 2025-12-04T14:42:50.331+05:30 nms-qfx5120-48ym-test mgd 83251 UI_CMDLINE_READ_LINE [junos@2636.1.1.1.2.139 username="root" command="show log abc | grep syslog-mon "] User 'root', command 'show log abc | grep syslog-mon '
Remote:
[root@host ~]# ssh syslog-mon@nms-qfx5120-48ym -s netconf
<!-- No zombies were killed during the creation of this user interface -->
<!-- user syslog-mon, class j-super-user -->
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>urn:ietf:params:netconf:base:1.0</capability>
<capability>urn:ietf:params:netconf:capability:candidate:1.0</capability>
<capability>urn:ietf:params:netconf:capability:confirmed-commit:1.0</capability>
<capability>urn:ietf:params:netconf:capability:validate:1.0</capability>
<capability>urn:ietf:params:netconf:capability:url:1.0?scheme=http,ftp,file</capability>
<capability>urn:ietf:params:xml:ns:netconf:base:1.0</capability>
<capability>urn:ietf:params:xml:ns:netconf:capability:candidate:1.0</capability>
<capability>urn:ietf:params:xml:ns:netconf:capability:confirmed-commit:1.0</capability>
<capability>urn:ietf:params:xml:ns:netconf:capability:validate:1.0</capability>
<capability>urn:ietf:params:xml:ns:netconf:capability:url:1.0?scheme=http,ftp,file</capability>
<capability>urn:ietf:params:xml:ns:yang:ietf-yang-metadata?module=ietf-yang-metadata&revision=2016-08-05</capability>
<capability>urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring</capability>
<capability>http://xml.juniper.net/netconf/junos/1.0</capability>
<capability>http://xml.juniper.net/dmi/system/1.0</capability>
<capability>http://yang.juniper.net/junos/jcmd?module=junos-configuration-metadata&revision=2021-09-01&…
</capabilities>
<session-id>80506</session-id>
</hello>
]]>]]>
<rpc><get-syslog-events><stream>messages</stream></get-syslog-events></rpc>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/26.1I-20251125_dev_common.0.1234/junos">
<syslog-events>
<syslog>
Dec 4 13:49:03 2025 nms-qfx5120-48ym-test mgd[65827]: UI_COMMIT: User 'syslog-mon' requested 'commit' operation (comment: none)
</syslog>
<syslog>
Dec 4 13:49:03 2025 nms-qfx5120-48ym-test ffp: "dynamic-profiles": No change to profiles
</syslog>
<syslog>
Dec 4 13:49:04 2025 nms-qfx5120-48ym-test mgd[65827]: UI_CONFIGURATION_REVISION_UPDATED: New database revision 're0-1764836343-29' and old database revision 're0-1764835976-28'
</syslog>
<syslog>
Dec 4 13:49:04 2025 nms-qfx5120-48ym-test mgd[65827]: UI_COMMIT_COMPLETED: : commit complete
</syslog>