ssh
Syntax
ssh host <bypass-routing> <verbose> <extensive> <inet | inet6> <interface interface-name> <logical-system logical-system-name> <tenant tenant-name> <routing-instance routing-instance-name> <source address> <v2> <port port-number>
Syntax (EX Series Switch and the QFX Series)
ssh host <bypass-routing> <verbose> <extensive> <inet | inet6> <interface interface-name> <routing-instance routing-instance-name> <source address> <v2> <port port-number>
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:
ssh address 'cli-command1 ; cli-command2 '
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. |
verbose |
(Optional) Display verbose messages during the SSH attempt. |
extensive |
Display an extensive level of messaging during the SSH attempt. |
inet | inet6 |
(Optional) Create an IPv4 or IPv6 connection, respectively. |
interface interface-name |
(Junos OS only) (Optional) Interface name for the SSH session. (This
option does not work when default-address-selection
is configured at the |
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
user@switch> ssh user Host key not found from the list of known hosts. Are you sure you want to continue connecting (yes/no)? yes Host ?user' added to the list of known hosts. user@device's password: Last login: Sun Jun 21 10:43:42 1998 from junos-router % ...
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.