This article provides information on how to upload the restricted kernel files to JTAC.
By default, on Junos, kernel core files are generated with restrictive access rights, so that the sensitive information, which is contained within these files, is available only to a restricted set of users. The following example is of such file access permissions (read/write for root user):
user@router1-re0> show system core-dumps -rw------- 1 root wheel 278392832 Oct 10 17:25 /var/crash/vmcore.0 /var/tmp/*core*: No such file or directory /var/tmp/pics/*core*: No such file or directory -rw-r--r-- 1 root wheel 15273950 Oct 10 17:25 /var/crash/kernel.0 total files: 2
Within JunOS, every user, who is set with the maintenance level (root like) privilege, can access the file archive command. This command creates an archive with the current user as the owner; but also allows the root owned files to be archived. This allows the user to then upload the resulting file to an SFTP or FTP server.
user@router1-re0> show cli authorization | match maintenance maintenance -- Can become the super-user
user@router1-re0> file archive compress source /var/crash/vmcore.0 destination /var/tmp/vmcore.0 /usr/bin/tar: Removing leading `/' from member names
user@router1-re0> file list detail /var/tmp/vmcore.0.tgz -rw------- 1 user field 68809080 Jan 7 19:34 /var/tmp/vmcore.0.tgz total 1
user@router1-re0> file copy /var/tmp/vmcore.0.tar scp://[email protected]:/pub/incoming/2012-0107-0000/ The authenticity of host 'sftp.juniper.net (66.129.230.52)' can't be established. RSA key fingerprint is 8b:6b:36:94:ea:6d:92:55:bb:1f:80:3e:54:ea:4d:30. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'sftp.juniper.net,66.129.230.52' (RSA) to the list of known hosts. [email protected]'s password: