Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Troubleshoot Junos PyEZ Authentication Errors When Managing Junos Devices

Problem

Description

Junos PyEZ generates an error regarding failed authentication. For example:

or

Cause

The Junos device or the console server through which the application connects might fail to authenticate the user for the following reasons:

  • The user does not have an account on the Junos device or on the console server through which the application connects.

  • The user has an account with a text-based password configured on the Junos device and the console server, if one is used, but the wrong password or no password is supplied for the user when creating the Device instance.

  • The user has an account and authenticates using SSH keys with the Junos device or a console server connected to the device, but the SSH keys are inaccessible on either the device or the configuration management server.

Note:

If you do not specify a user when creating the Device instance, the user defaults to $USER.

Solution

Ensure that the user executing the Junos PyEZ code has a login account on all target Junos devices or console servers where appropriate and that the SSH public key or text-based password is configured for the account. If SSH keys are configured, verify that the user can access them. Also, confirm that the correct parameters are supplied when creating the Device instance.