ssh
Syntax
Syntax (EX Series Switch and the QFX Series)
Release Information
Command introduced before Junos OS Release 7.4.
Command introduced in Junos OS Release 9.0 for EX Series switches.
Command introduced in Junos OS Release 11.1 for 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. |
routing-instance routing-instance-name | — | (Optional) Name of the routing instance for the SSH attempt. |
source address | — | (Optional) Source address of the SSH connection. |
v1 | v2 | — | (Optional) Use SSH version 1 or 2, respectively, when connecting to a remote host. |
Additional Information
To configure an SSH (version 1) key for your user account, include the authentication ssh-rsa statement at the [edit system login user user-name] hierarchy level. 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. For details, see the .
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. For details, see the .
Required Privilege Level
network
List of Sample Output
sshOutput Fields
When you enter this command, you are provided feedback on the status of your request.
Sample Output
ssh
user@switch> ssh cree
Host key not found from the list of known hosts. Are you sure you want to continue connecting (yes/no)? yes Host ?cree' added to the list of known hosts. boojun@cree's password: Last login: Sun Jun 21 10:43:42 1998 from junos-router % ...