Juniper

Juniper SRX340 Password Recovery

Step-by-step password recovery for the Juniper SRX340 (SRX Series (Junos)). Console access required.

Overview

This guide provides step-by-step instructions for resetting lost or forgotten administrative passwords on enterprise networking hardware. Follow the procedure below carefully to regain access while preserving your device configuration.

Prerequisites

Before proceeding with password recovery, ensure you have a console cable, terminal emulation software configured to 9600 baud, and physical access to the device.

Step 1: Establish Console Connection

Connect your terminal cable to the console port of the device and open your serial terminal session.

Step 2: Interrupt the Boot Sequence

Power cycle the hardware and issue a Break key sequence during initial system startup to enter ROMMON mode.

Step 3: Reset Password & Configuration

Bypass startup configuration loading, boot into system software, set your new credentials, and save changes back to non-volatile memory.

Overview

This procedure recovers root access to the Juniper SRX 340 running Junos OS when the root password or login passwords are lost. The device is booted into single-user mode to reset the root password — the configuration is preserved.

Prerequisites

Console cable with a terminal session at 9600 baud, 8N1. Physical or remote power access to reboot the device.

Recovery Procedure — Single-User Mode

  1. Connect the console cable and open a terminal session (9600 8N1).
  2. Reboot the device: request system reboot (or power-cycle).
  3. As the device boots, watch for the prompt "Press SPACE to enter boot loader" (or "Hit [Enter] to boot immediately" on newer platforms) and press the Space bar immediately.
  4. You reach the boot loader prompt: loader> (on older platforms) or OK (U-Boot on newer EX/QFX/MX platforms).
  5. Boot into single-user mode: boot -s
  6. The device boots into single-user mode and drops to a root shell prompt (often -sh-4.2# or similar).
  7. Mount the filesystems read-write: mount -a (if it fails, try mount -o rw / first).
  8. Reset the root password: passwd root — enter the new root password twice.
  9. Exit single-user mode to continue booting: exit (or press Ctrl+D). The device completes its normal boot.
  10. Log in as root with the new password. Then reset the root password hash in the config (recommended so it survives commits): cliconfigureset system root-authentication plain-text-password → enter the password → commitexit.
  11. Also reset any admin/login user passwords that were lost: set system login user <username> authentication plain-text-passwordcommit.

Important Notes

Protecting Your Configuration

Before recovery, back up the config: request system configuration rescue save and export show configuration | save /var/tmp/backup.conf, or save /var/tmp/backup.conf from operational mode. After recovery, verify show configuration system root-authentication reflects the new password.