How to Access Junos Devices with Telnet

By Walter J. Goralski, Cathy Gadecki, Michael Bushong

The basic way of accessing a remote device is using Telnet. After you configure an IP address on the management interface (whether that interface is out-of-band or in-band), you can access the device by opening up a Telnet session to that address.

For example, if you configure your device with a management interface address of, you should be able to access the device with the Telnet session:

> telnet
telnet: connect to address Connection refused
telnet: Unable to connect to remote host

Oops, something went wrong. Access to the device must be explicitly configured on the device (which is part of the initial setup, but many people don’t complete it!). More specifically, particular modes of access must be explicitly enabled. In this case, you’re trying to access the device using Telnet, so you must tell the device to allow Telnet connections. To configure the Telnet service on the device, do the following:

system {
  services {

After Telnet services are enabled on the device, the Telnet request is successful:

> telnet
Connected to
Escape character is '^]'.
dummies (ttyp0)

When your Telnet session is established, access is then based on user authentication. The exact authentication mechanism is based on your configuration.

Root access to the device is restricted to only those connections that are made via the console (indicating physical access to the router) or via an encrypted session (such as SSH or HTTPS).

If you try to log in with the root username, your login will fail regardless of the password you enter. If you must use Telnet to access the device and you must have root access, try setting up a user ID with super-user privileges.