Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


traceoptions (Outbound SSH)


Hierarchy Level


Set the trace options for the outbound SSH service. By default, tracing operations are disabled.


  • file—Configure the trace file information.

    • filename—(Optional) By default, the name of the file is the name of the process being traced. Use this option to override the default file name and specify a file to receive the output of the tracing operation. Enclose the name within quotation marks. All trace files are placed in the directory /var/log.

    • files number—(Optional) Specify the maximum number of trace files to create before overwriting the oldest one. If you specify a maximum number of files, you also must specify a maximum file size with the size option and a file name with the filename option.

      Range: 2 through 1000 files

      Default: 3 files

    • match regular-expression—(Optional) When configured, the system adds only those lines to the trace file that match the regular expression. For example, if the regular expression is set to =error, the system only adds lines to the trace file that include the string error.

    • size maximum-file-size—(Optional) Specify the maximum size of each trace file, in kilobytes (KB), megabytes (MB), or gigabytes (GB). When a trace file named trace-file reaches this size, it is renamed trace-file.0. When trace-file again reaches its maximum size, trace-file.0 is renamed trace-file.1 and trace-file is renamed trace-file.0. This renaming scheme continues until the maximum number of trace files is reached. Then the oldest trace file is overwritten.

      If you specify a maximum file size, you also must specify a maximum number of trace files by using the files option and a filename by using the file option.

      Syntax: x K to specify KB, x m to specify MB, or x g to specify GB

      Range: 10 KB through 1 GB

      Default: 128 KB

    • world-readable | no-world-readable—(Optional) By default, access to the trace files is restricted to the user who configured the tracing operation. The world-readable option enables any user to read the file. To explicitly set the default behavior, configure the no-world-readable option.

  • flag—Specify the tracing operation to perform. To specify more than one tracing operation, include multiple flag statements. You can include the following flags:

    • all—Trace all events.

    • configuration—Trace configuration events.

    • connectivity—Trace TCP connection handling between the management application and the device.

  • no-remote-trace—(Optional) Disable remote tracing and logging operations that track normal operations, error conditions, and packets that are generated by or passed through the device.

Required Privilege Level

trace—To view this statement in the configuration.

trace-control—To add this statement to the configuration.

Release Information

Statement introduced in Junos OS Release 10.4.