ssh (client login)

Syntax

ssh [<USERNAME>@]{<IPV4> | <HOSTNAME>} [vrf <VRF-NAME>] [port <PORT-NUMBER>]

Description

Establishes a client session with an SSH server which is typically another switch.

Command context

Manager (#)

Parameters

<USERNAME>

Specifies the username that the client uses to log in to an SSH server. When omitted, the username of the current session is used.

{<IPV4> | <HOSTNAME>}
Specifies the SSH server to which the SSH client will connect.
  • <IPV4>: The IPv4 address.

  • <HOSTNAME>: The host name.
vrf <VRF-NAME>

Specifies the VRF to be used for the SSH client session. When omitted, the default VRF named default is used.

port <PORT-NUMBER>

Specifies the SSH server TCP port number. When omitted, the default TCP port 22 is used.

Authority

Administrators or local user group members with execution rights for this command.

Examples

Establishing an SSH client session (using the management VRF) with an SSH server:

switch# ssh admin@10.0.11.180 vrf mgmt

Establishing an SSH client session (using the default VRF and a specific port) with an SSH server:

switch# ssh admin@10.0.11.175 port 223

Configuring a test user on switch 1 and then connecting to switch 1 from switch 2 using the SSH client on the mgmt VRF:

** Configuring a test user on switch 1 **
switch(config)# user-group test
switch(config-usr-grp-test)# permit cli command ".*"
switch(config)# exit
switch(config)# user test-user group test password plaintext tst#9J%

** On switch 2, connecting to switch 1 using the SSH client **
switch# ssh test-user@10.0.11.177 vrf mgmt