Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

ssh

Syntax

Syntax (EX Series Switch and the QFX Series)

Description

Use the SSH program to open a connection between a local router or switch and a remote system and execute commands on the remote system. You can issue the ssh command from the Junos OS CLI to log in to a remote system or from a remote system to log in to the local router or switch. When executing this command, you include one or more CLI commands by enclosing them in quotation marks and separating the commands with semicolons:

Options

host

Name or address of the remote system.

bypass-routing

(Optional) Bypass the normal routing tables and send ping requests directly to a system on an attached network. If the system is not on a directly attached network, an error is returned. Use this option to ping a local system through an interface that has no route through it.

inet | inet6

(Optional) Create an IPv4 or IPv6 connection, respectively.

interface interface-name

(Optional) Interface name for the SSH session. (This option does not work when default-address-selection is configured at the [edit system] hierarchy level, because this configuration uses the loopback interface as the source address for all locally generated IP packets.)

logical-system logical-system-name

(Optional) Name of a particular logical system for the SSH attempt.

tenant tenant-name

(Optional) Name of a particular tenant system for the SSH attempt.

routing-instance routing-instance-name

(Optional) Name of the routing instance for the SSH attempt.

source address

(Optional) Source address of the SSH connection.

v2

(Optional) Use SSH version 2 when connecting to a remote host.

port port-number

(Optional) Specify a port number for the SSH connection.

Additional Information

To configure an SSH (version 2) key for your user account, include the authentication dsa-rsa statement at the [edit system login user user-name] hierarchy level.

You can limit the number of times a user can attempt to enter a password while logging in through SSH. To specify the number of times a user can attempt to enter a password to log in through SSH, include the retry-options statement at the [edit system login] hierarchy level.

Required Privilege Level

network

Output Fields

When you enter this command, you are provided feedback on the status of your request.

Sample Output

ssh

Release Information

Command introduced before Junos OS Release 7.4.

Command introduced in Junos OS Release 11.1 for the QFX Series.

Command introduced in Junos OS Release 14.1X53-D20 for OCX Series switches.

The command tenant option is introduced in Junos OS Release 19.2R1 for SRX Series.