Mellanox MLNX-OS User Manual for SX1018HP Ethernet Managed Blade Switch

Rev 2.10
Mellanox Technologies
40
Mellanox Technologies Confidential
3.3 Secure Shell (SSH)
3.3.1 Adding a Host and Providing an SSH Key
To add entries to the global known-hosts configuration file and its SSH value:
Step 1. Change to Config mode Run:
Step 2. Add an entry to the global known-hosts configuration file and its SSH value. Run:
Step 3. Verify what keys exist in the host. Run:
3.3.2 Retrieving Return Codes when Executing Remote Commands
To stop the CLI and set the system to send return errors if some commands fail:
Step 1. Connect to the system from the host SSH.
Step 2. Add the
-h
parameter after the
cli
(as shown in the example below) to notify the system to halt
on failure and pass through the exit code.
It is recommended not to use more than 100 concurrent SSH sessions to the switch.
switch [standalone: master] > enable
switch [standalone: master] # configure terminal
switch [standalone: master] (config) #
switch [standalone: master] (config) # ssh client global known-host "myserver ssh-rsa
AAAAB3NzaC1yc2EAAAABIwAAAIEAsXeklqc8T0EN2mnMcVcfhueaRYzIVqt4rVsrERIjmlJh4mkYYIa8hGGikNa+
t5xw2dRrNxnHYLK51bUsSG1ZNwZT1Dpme3pAZeMY7G4ZMgGIW9xOuaXgAA3eBeoUjFdi6+1BqchWk0nTb+gMfI/
MK/heQNns7AtTrvqg/O5ryIc=”
switch [standalone: master] (config) #
switch [standalone: master] (config) # show ssh client
SSH client Strict Hostkey Checking: ask
SSH Global Known Hosts:
Entry 1: myserver
Finger Print: d5:d7:be:d7:6c:b1:e4:16:df:61:25:2f:b1:53:a1:06
No SSH user identities configured.
No SSH authorized keys configured.
switch [standalone: master] (config) #
ssh <username>@<hostname> cli -h '"enable" "show interfaces brief"'