User Accounts and Authentication
Learn how to create user accounts and configure authentication methods for SRX1600, SRX4120, and SRX4300 Firewalls.
After you complete the system configuration of the hostname, time zone, and device identity for the SRX1600, SRX4120, and SRX4300 Firewalls, you can create user accounts and configure authentication methods. User accounts and authentication methods determine who can log in to the system, how users are authenticated, and which actions the users can perform on the device.
A user account is an identity configured on the device that enables a user to access the system. A user account includes a username, a password or other authentication methods, and a login class that defines the user permissions. For more information, see User Accounts.
Authentication is the process of verifying the user's identity before granting access. For more information, see User Authentication Overview.
Local User Account
This authentication method is the simplest, where the username and password are stored on the firewall. You can create a user and define permissions and system access using login classes. For more information, see User Accounts and Login Classes Overview.
Example: Create Admin User
[edit] root@srx# set system login user admin class super-user root@srx# set system login user admin authentication plain-text-password
SSH Key Authentication
The SRX1600, SRX4120, and SRX4300 Firewalls support SSH key authentication for the root user. You can set an SSH public key (DSA, RSA, ECDSA, or ED25519) as the root authentication method instead of a password. Ensure the public key is properly formatted without line breaks.
- For production, consider additional SSH hardening (such as protocol-version v2, root-login deny) and user accounts beyond root.
Access the CLI: Log in as root through the console (no initial password). Enter CLI configuration mode:
root@srx0% cli root@srx> configure root@srx#
Set
root-authenticationwith SSH public key:set system root-authentication ssh-dsa <public-key-string>
Or use the
set system root-authentication ssh-rsa <public-key-string>command, replacing<public-key-string>with your public key (such asssh-rsa AAAAB3NzaC1yc2E...).Configure the management interface (required for SSH access):
set interfaces fxp0 unit 0 family inet address <management-ip>/<prefix length>
Set the default route:
set routing-options static route 0.0.0.0/0 next-hop <gateway-ip>
Enable SSH services (if not already enabled):
set system services ssh commit
For evaluated configurations, specify allowed algorithms (such as hostkey-algorithm, key-exchange, macs, ciphers).
Disabling or restricting root SSH access:
After adding a non-root user, enhance security by restricting root SSH access using these options:
system services ssh set system services ssh root-login deny #Completely disables SSH login as root (no password or key authentication allowed) set system services ssh root-login deny-password #Allows root SSH login only with SSH keys (password authentication denied for root)
Verification
- Verify the SSH login details using the
show configuration system services sshandssh -i <private-key> root@<management-ip>commands. - View your configurations using the
show system root-authenticationorshow configuration system services sshcommands.
RADIUS Authentication
RADIUS authentication uses a centralized server to authenticate users who attempt to access a network device. This method is common in Telecom networks. For more information, see RADIUS Authentication.
Configure a RADIUS server:
[edit] root@srx# set system radius-server server-address secret password root@srx# set system radius-server server-address source-address ip-address
Configure the authentication order:
[edit] root@srx# set system authentication-order [radius password]
This means, try the RADIUS authentication first, and if that fails, use the local user authentication method.
TACACS+ Authentication
TACACS+ authentication is an alternate method of authenticating when you attempt to access a network device. TACACS+ provides authentication and command authorization. For more information, see TACACS+ Authentication.
Configure a TACACS+ server:
[edit] root@srx# set system tacplus-server server-address root@srx# set system tacplus-server server-address secret password root@srx# set system tacplus-server server-address source-address source-address
Configure the authentication order:
[edit] root@srx# set system authentication-order [tacplus radius password]
This means, try the TACACS+ authentication first, and if that fails, use the RADIUS authentication. If RADIUS authentication fails, then use the local user authentication method.