Configure the Root Password
The JUNOS software is preinstalled on the router. When the router is powered on, it is ready to be configured. Initially, you log into the router as the user "root" with no password. After you log in, you should configure the root (superuser) password by including the
root-authenticationstatement at the[edit system]hierarchy level:[edit system]root-authentication {(encrypted-password "password"| plain-text-password);ssh-rsa "public-key";ssh-dsa "public-key";}If you configure the
plain-text-passwordoption, you are prompted to enter and confirm the password:[edit system]user@host#set root-authentication plain-text-passwordNew password:type password hereRetype new password:retype password hereFor information about how to create plain-text passwords, see Plain-Text Passwords.
To load an ssh key file, enter the
load-key-filecommand. This command loads RSA (ssh version 1) and DSA (ssh version 2) public keys. You can also configure a user to use ssh-rsa and ssh-dsa keys.If you load the ssh keys file, the contents of the file are copied into the configuration immediately after you enter the
load-key-filestatement. To view the ssh keys entries, use the configuration modeshowcommand. For example:[edit system]user@host#set root-authentication load-key-file my-host:.ssh/identity.pub.file.19692 | 0 KB | 0.3 kB/s | ETA: 00:00:00 | 100%[edit system]user@host#showroot-authentication {ssh-rsa "1024 35 97276382040842510554682267572498642416303222074049625 2839038203869014158453496417001961060835872296156347578491827360336 1276441874265946893207739108344810126831259577226254616679992783161 2350043866091586628382248974673260566119218148953981396556156378621 194032768780653816960202749164163735913269396344008443 boojum@juniper.net"; # SECRET-DATA}Example: Configure the Root Password
Configure an encrypted password:
[edit]user@host#set system root-authentication encrypted-password "$1$14c5.$sBopasddsdfs0"[edit]user@host#showsystem {root-authentication {encrypted-password "$1$14c5.$sBopasddsdfs0";}}Configure a plain-text password:
[edit]user@host#set system root-authentication plain-text-passwordNew password:type root passwordRetype new password:retype root password[edit]user@host#showsystem {root-authentication {encrypted-password "$1$14c5.$sBopasddsdfs0";}}