image image image image image

On This Page

CLI Session

This section displays all the relevant commands used to manage CLI session terminal.

cli clear-history


cli clear-history

Clears the command history of the current user.

Syntax DescriptionN/A

Default

N/A

Configuration Mode

config

History

8.0.0100

Example

gateway (config) # cli clear-history
Related Commandsshow cli

Notes


cli default


cli default {auto-logout <minutes> | paging enable | prefix-modes {enable | show-config} | progress enable | prompt {confirm-reload | confirm-reset | confirm-unsaved | empty-password}}
no cli default {auto-logout | paging enable | prefix-modes {enable | show-config} | progress enable prompt {confirm-reload | confirm-reset | confirm-unsaved | empty-password}

Configures default CLI options for this session only.
The no form of the command deletes or disables the default CLI options.

Syntax Description

minutes

Configures keyboard inactivity timeout for automatic logout.
Range is 0-35791 minutes.
Setting the value to 0 or using the no form of the command disables the auto-logout.

paging enable

Enables text viewing one screen at a time.

prefix-modes {enable | show-config}

Configures the prefix modes feature of CLI.

  • “prefix-modes enable” enables prefix modes for current session
  • “prefix-modes show-config” uses prefix modes in “show configuration” output for current session

progress enable

Enables progress updates.

prompt confirm-reload

Prompts for confirmation before rebooting.

prompt confirm-reset

Prompts for confirmation before resetting to factory state.

prompt confirm-unsaved

Confirms whether or not to save unsaved changes before rebooting.

prompt empty-password

Prompts for a password if none is specified in a pseudo-URL for SCP.

Default

N/A

Configuration Mode

config

History

8.0.0100

Example

gateway (config) # cli default prefix-modes enable
Related Commandsshow cli

Notes


cli max-sessions


cli max-sessions <number>
no cli max-sessions

Configures the maximum number of simultaneous CLI sessions allowed.
The no form of the command resets this value to its default.

Syntax Description

number

Range: 3-30

Default

30 sessions

Configuration Mode

config

History

8.0.0100

Example

gateway (config) # cli max-sessions 40
Related Commandsshow terminal

Notes




cli session


cli session {auto-logout <minutes> | paging enable | prefix-modes enable | progress enable | terminal {length <size> | resize | type <terminal-type> | width} | x-display full <display>}
no cli session {auto-logout | paging enable | prefix-modes enable | progress enable | terminal type | x-display}

Configures CLI options for this session only.
The no form of the command deletes or disables the CLI sessions.

Syntax Description

minutes

Configures keyboard inactivity timeout for automatic logout.
Range: 0-35791 minutes
Setting the value to 0 or using the no form of the command disables the auto logout.

paging enable

Enables text viewing one screen at a time.

prefix-modes enable

Configures the prefix modes feature of CLI and enables prefix modes for current session.

progress enable

Enables progress updates.

terminal length

Sets the number of lines for the current terminal.
Range: 5-999

terminal resize

Resizes the CLI terminal settings (to match the actual terminal window).

terminal-type

Sets terminal type. Valid options:

  • ansi
  • console
  • dumb
  • linux
  • unknown
  • vt52
  • vt100
  • vt102
  • vt220
  • xterm

terminal width

Sets the width of the terminal in characters.
Range: 34-999

x-display full <display>

Specifies the display as a raw string (e.g., localhost:0.0)

Default

N/A

Configuration Mode

config

History

8.0.0100

Example

gateway (config) # cli session auto-logout
Related Commandsshow terminal

Notes

The "minutes" attribute can be configured from the CLI shell only.

terminal


terminal {length <number of lines> | resize | type <terminal type> | width <number of characters>}
no terminal type

Configures default CLI options for this session only.
The no form of the command clears the terminal type.

Syntax Description

length

Sets the number of lines for this terminal.
Range: 5-999

resize

Resizes the CLI terminal settings (to match with real terminal).

type

Sets the terminal type.
Possible values: ansi, console, dumb, linux, screen, vt52, vt100, vt102, vt220, xterm

width

Sets the width of this terminal in characters.
Range: 34-999

Default

N/A

Configuration Mode

config

History

8.0.0100

Example

gateway (config) # terminal length 500
Related Commandsshow terminal

Notes


terminal sysrq enable 


terminal sysrq enable
no terminal sysrq enable

Enable SysRq over the serial connection (RS232 or Console port).
The no form of the command disables SysRq over the serial connection (RS232 or Console port).

Syntax Description

N/A 

Default

Disabled

Configuration Mode

config

History

8.0.0100

8.0.3000Updated command to be disabled by default

Example

gateway (config) # terminal sysrq enable
Related Commandsshow terminal

Notes


show cli


show cli

Displays the CLI configuration and status.

Syntax Description

N/A

Default

N/A

Configuration Mode

Any command mode

History

8.0.0100

Example

gateway (config) # show cli
CLI current session settings:
Maximum line size: 8192
Terminal width: 171 columns
Terminal length: 38 rows
Terminal type: xterm
X display setting: (none)
Auto-logout: disabled
Paging: enabled
Progress tracking: enabled
Prefix modes: disabled
CLI defaults for current session:
Auto-logout: disabled
Paging: enabled
Progress tracking: enabled
Prefix modes: enabled (and use in 'show configuration')
Settings for current session:
Show hidden config: yes
Confirm losing changes: yes
Confirm reboot/shutdown: no
Confirm factory reset: yes
Prompt on empty password: yes
Related Commandscli default

Notes


show cli max-sessions


show cli max-sessions

Displays maximum number of sessions.

Syntax Description

N/A 

Default

N/A

Configuration Mode

Any command mode

History

8.0.0100

Example

gateway (config) # show cli max-sessions
Maximum number of CLI sessions: 5
Related Commands

Notes


show cli num-sessions


show cli num-sessions

Displays current number of sessions.

Syntax Description

N/A

Default

N/A

Configuration Mode

Any command mode

History

8.0.0100

Example

gateway (config) # show cli num-sessions
Current number of CLI sessions: 40
Related Commands

Notes


Banner

banner login


banner login <string>
no banner login

Sets the CLI welcome banner message.
The no form of the command resets the system login banner to its default.

Syntax Description

N/A

Default


Configuration Mode

Any command mode

History

8.0.0100

Example

gateway (config) # banner login Example
Related Commandsshow banner

Notes

 If more than one word is used (there is a space) quotation marks should be added (i.e., “xxxx xxxx”).

banner login-local


banner login-local <string>
no banner login-local

Sets system login local banner.
The no form of the command resets the banner to its default value.

Syntax Description

N/A

Default


Configuration Mode

Any command mode

History

8.0.0100

Example

gateway (config) # banner login-local Example
Related Commandsshow banner

Notes

  • The login-local refers to the serial connection banner
  • If more than one word is used (there is a space) quotation marks should be added (i.e., “xxxx xxxx”)

banner login-remote


banner login-remote <string>
no banner login-remote

Sets system login remote banner.
The no form of the command resets the banner to its default value.

Syntax DescriptionstringText string
DefaultEnabled
Configuration Modeconfig
History8.0.0100
Example
gateway (config) # banner login-remote Example
Related Commandsshow banner
Notes
  • The login-remote refers to the SSH connections banner
  • If more than one word is used (there is a space) quotation marks should be added (i.e., “xxxx xxxx”).

banner logout


banner logout <string>
no banner logout

Sets system logout banner (for both local and remote logins).
The no form of the command resets the banner to its default value.

Syntax DescriptionstringText string
DefaultEnabled
Configuration Modeconfig
History8.0.0100
Example
gateway (config) # banner logout Example
Related Commandsshow banner
Notes

If more than one word is used (there is a space) quotation marks should be added (i.e., “xxxx xxxx”).

banner logout-local


banner logout-local <string>
no banner logout-local

Sets system logout local banner.
The no form of the command resets the banner to its default value.

Syntax DescriptionstringText string
DefaultEnabled
Configuration Modeconfig
History8.0.0100
Example
gateway (config) # banner logout-local Example
Related Commandsshow banner
Notes
  • The logout-local refers to the serial connection banner
  • If more than one word is used (there is a space) quotation marks should be added (i.e., “xxxx xxxx”). 

banner logout-remote


banner logout-remote <string>
no banner logout-remote

Sets system logout remote banner.
The no form of the command resets the banner to its default value.

Syntax DescriptionstringText string
DefaultEnabled
Configuration Modeconfig
History8.0.0100
Example
gateway (config) # banner logout-remote Example
Related Commandsshow banner
Notes
  • The logout-remote refers to SSH connections banner
  • If more than one word is used (there is a space) quotation marks should be added (i.e., “xxxx xxxx”).

banner motd


banner motd <string>
no banner motd

Configures the message of the day banner.
The no form of the command resets the system Message of the Day banner.

Syntax DescriptionstringText string
Default

Enabled

Configuration Modeconfig
History8.0.0100
Example
gateway (config) # banner motd “My Banner”
Related Commandsshow banner
Notes
  • If more than one word is used (there is a space) quotation marks should be added (i.e., “xxxx xxxx”).
  • To insert a multi-line MotD, hit Ctrl-V (escape sequence) followed by Ctrl-J (new line sequence). The symbol “^J” should appear. Then, whatever is typed after it becomes the new line of the MotD. Remember to also include the string between quotation marks.

SSH

ssh server enable


ssh server enable
no ssh server enable

Enables the SSH server.
The no form of the command disables the SSH server.

Syntax DescriptionN/A
DefaultSSH server is enabled
Configuration Modeconfig
History8.0.0100
Example
gateway (config) # ssh server enable
Related Commandsshow banner
Notes

Disabling SSH server does not terminate existing SSH sessions, it only prevents new ones from being established.


ssh server host-key


ssh server host-key {<key-type> {private-key <private-key>| public-key <public-key>} | generate}

Configures host keys for SSH.

Syntax Descriptionkey-type
  • rsa2—RSAv2
  • dsa2—DSAv2
private-keySets new private-key for the host keys of the specified type.
public-keySets new public-key for the host keys of the specified type.
generateGenerates new RSA and DSA host keys for SSH.
DefaultSSH keys are locally generated
Configuration Modeconfig
History8.0.0100
Example
gateway (config) # ssh server host-key dsa2 private-key
Key: ***********************************************
Confirm: ***********************************************
Related Commandsshow banner
Notes

RSA2 and a DSA2 host keys are generated by default. The RSA2 key can be used as SSH server and client, while DSA2 key can only be used as SSH client.
When the switch is a server, use RSA key to connect to the MLNX-GW device.

When the switch is a client (e.g., downloading image or uploading logs), RSA key is recommended. DSA key is only for legacy devices and has been deprecated by OpenSSH starting with the 7.0 release.

ssh server listen


ssh server listen {enable | interface <inf>}
no ssh server listen {enable | interface <inf>}

Enables the listen interface restricted list for SSH. If enabled, and at least one non-DHCP interface is specified in the list, the SSH connections are only accepted on those specified interfaces.
The no form of the command disables the listen interface restricted list for SSH. When disabled, SSH connections are not accepted on any interface.

Syntax Descriptionenable

Enables SSH interface restrictions on access to this system

interfaceAdds interface to SSH server access restriction list.
Possible interfaces: “lo” and “mgmt0”
DefaultSSH listen is enabled
Configuration Modeconfig
History8.0.0100
Example
gateway (config) # ssh server listen enable
Related Commandsshow ssh server
Notes


ssh server login attempts


ssh server login attempts <number>
no ssh server login attempts

Configures maximum login attempts on SSH server.
The no form of the command resets the login attempts value to its default.

Syntax Descriptionnumber

Range: 3-100 attempts

interfaceAdds interface to SSH server access restriction list.
Possible interfaces: “lo” and “mgmt0”
Default6 attempts
Configuration Modeconfig
History8.0.0100
Example
gateway (config) # ssh server login attempts 5
Related Commandsshow ssh server
Notes


ssh server login timeout


ssh server login timeout <time>
no ssh server login timeout

Configures login timeout on SSH server.
The no form of the command resets the timeout value to its default.

Syntax Descriptiontime

Range: 1-600 seconds

Default120 seconds
Configuration Modeconfig
History8.0.0100
Example
gateway (config) # ssh server login timeout 130
Related Commandsshow ssh server
Notes




ssh server login record-period


ssh server login record-period <days> no ssh server login record-period

Configures the amount of days for counting the number of successful logins.
The no form of the command disabled this function.

Syntax DescriptionDays

Range: 1-30 days
Default: 1 day

DefaultDisabled
Configuration Modeconfig
History8.0.0100
Example
gateway (config) # ssh server login record-period 1
Related Commandsshow ssh server login record-period show ssh server
Notes


ssh server min-version


ssh server min-version <version>
no ssh server min-version

Sets the minimum version of the SSH protocol that the server supports.
The no form of the command resets the minimum version of SSH protocol supported.

Syntax Descriptionversion

Possible versions: 1 and 2

Default2
Configuration Modeconfig
History8.0.0100
Example
gateway (config) # ssh server min-version 2
Related Commandsshow ssh server
Notes


ssh server ports


ssh server ports {<port1> [<port2>...]}

Specifies which ports the SSH server listens on.

Syntax Descriptionport

Port number range: 1-65535

Default22
Configuration Modeconfig
History8.0.0100
Example
gateway (config) # ssh server ports 22
Related Commandsshow ssh server
Notes
  • Multiple ports can be specified by repeating the <port> parameter
  • The command will remove any previous ports if not listed in the command



ssh server security strict


ssh server ports {<port1> [<port2>...]}

Enables strict security settings.
The no form of the command disables strict security settings.

Syntax DescriptionN/A
DefaultN/A
Configuration Modeconfig
History8.0.0100
Example
gateway (config) # ssh server security strict
Related Commandsshow ssh server
Notes

The following ciphers are disabled for SSH when strict security is enabled:

ssh server security strict


ssh server tcp-forwarding enable

Enables TCP port forwarding.
The no form of the command disables TCP port forwarding.

Syntax DescriptionN/A
DefaultN/A
Configuration Modeconfig
History8.0.0100
Example
gateway (config) # ssh server tcp-forwarding enable
Related Commandsshow ssh server
Notes


ssh server x11-forwarding


ssh server x11-forwarding enable
no ssh server x11-forwarding enable

Enables X11 forwarding on the SSH server.
The no form of the command disables X11 forwarding.

Syntax DescriptionN/A
DefaultDisabled
Configuration Modeconfig
History8.0.0100
Example
gateway (config) # ssh server x11-forwarding enable
Related Commands
Notes

ssh client global


ssh client global {host-key-check <policy>} | known-host <known-host-entry>}
no ssh client global {host-key-check | known-host localhost}

Configures global SSH client settings.
The no form of the command negates global SSH client settings.

Syntax Descriptionhost-key-check <policy>Sets SSH client configuration to control how host key checking is performed. This parameter may be set in 3 ways.
  • If set to “no”, it always permits connection and accepts any new or changed host keys without checking
  • If set to “ask”, it prompts user to accept new host keys, but does not permit a connection if there was already a known host entry that does not match the one presented by the host
  • If set to “yes”, it only permits connection if a matching host key is already in the known hosts file
known-hostAdds an entry to the global known-hosts configuration file.
known-host-entryAdds/removes an entry to/from the global known-hosts configuration file. The entry consist of “<IP> <key-type> <key>”.
Defaulthost-key-check – ask, no keys are configured by default
Configuration Modeconfig
History8.0.0100
Example
gateway (config) # ssh client global host-key-check no
gateway (config) # ssh client global known-host "72.30.2.2 ssh-rsa AAAAB3NzaC1yc2EAAAAB....f2CyXFq4pzaR1jar1Vk="
Related Commands

show ssh client

Notes


ssh client user


ssh client user <username> {authorized-key sshv2 <public key> | identity <key type> {generate | private-key [<private key>] | public-key [<public key>]} | known-host <known host> remove}
no ssh client user admin {authorized-key sshv2 <public key ID> | identity <key type>}

Adds an entry to the global known-hosts configuration file, either by generating new key, or by adding manually a public or private key.
The no form of the command removes a public key from the specified user's authorized key list, or changes the key type.

Syntax DescriptionusernameThe specified user must be a valid account on the system.
Possible values: “admin”, “monitor”, “xmladmin”, and “xmluser”
authorized-key sshv2 <public key>Adds the specified key to the list of authorized SSHv2 RSA or DSA public keys for this user account. These keys can be used to log into the user's account.
identity <key type>Sets certain SSH client identity settings for a user: dsa2 or rsa2.
generateGenerates SSH client identity keys for specified user.
private-keySets private key SSH client identity settings for the user.
public-keySets public key SSH client identity settings for the user.
known-host <known host> removeRemoves host from user's known host file.
DefaultNo keys are created by default
Configuration Modeconfig
History8.0.0100
Example
gateway (config) # ssh client user admin known-host 172.30.1.116 remove
Related Commands

show ssh client

NotesIf a key is being pasted from a cut buffer and was displayed with a paging program, it is likely that newline characters have been inserted, even if the output was not long enough to require paging. One can specify “no cli session paging enable” before running the “show” command to prevent the newlines from being inserted.

slogin 


slogin [<slogin options>] <hostname>

Invokes the SSH client. The user is returned to the CLI when SSH finishes.

Syntax Descriptionslogin options

-p
-c
-L
-l
-m
-R
-o

-1
-2
-4
-6
-g
-q
-V
-v
-x
-X
-Y
-y
-a
-A

-o flags (option allowed flags):

    AdressFamily
    BatchMode
    CheckHostIP
    Cipher
    Ciphers
    ConnectTimeout
    ForwardAgent
    ForwardX11
    ForwardX11Trusted
    HostKeyAlgorithms
    KexAlgorithms
    LogLevel
    MACs
    Port
    PubkeyAcceptedKeyTypes
    PubkeyAuthentication
    StrictHostKeyChecking
    TCPKeepAlive
    User
    VerifyHostKeyDNS

DefaultN/A
Configuration Modeconfig
History8.0.0100
8.1.1000Updated slogin options
Example
gateway (config) # slogin 192.168.10.70
The authenticity of host '192.168.10.70 (192.168.10.70)' can't be established.
RSA key fingerprint is 2e:ad:2d:23:45:4e:47:e0:2c:ae:8c:34:f0:1a:88:cb.
Are you sure you want to continue connecting (yes/no)? yes
Related Commands
NotesFor more information about slogin options see the following: linux.die.net/man/1/ssh

show ssh client


show ssh client

Displays the client configuration of the SSH server.

Syntax DescriptionN/A
DefaultN/A
Configuration ModeAny command mode
History8.0.0100
Example
gateway (config) # show ssh client
SSH client Strict Hostkey Checking: ask
 
SSH Global Known Hosts:
Entry 1: 72.30.2.2
Finger Print: 1e:b7:8b:ec:ab:35:98:be:6b:d6:12:c2:18:72:12:d6
 
No SSH user identities configured.
 
No SSH authorized keys configured.
Related Commands
Notes


show ssh server


show ssh server

Displays SSH server configuration.

Syntax DescriptionN/A
DefaultN/A
Configuration ModeAny command mode
History8.0.0100
Example
gateway (config) # show ssh server
SSH server configuration:
SSH server enabled: yes
Server security strict mode: no
Minimum protocol version: 2
TCP forwarding enabled: yes
X11 forwarding enabled: no
SSH login timeout: 120
SSH login max attempts: 6
SSH server login record-period: 1
SSH server ports: 22
 
Interface listen enabled: yes
Listen Interfaces:
No interface configured.
 
Host Key Finger Prints and Key Lengths:
RSA v2 host key: SHA256:gVu6qLW1ZifEp8wRer2jkvILZMGNl6VCYU3HqC1INC8 (2048)
DSA v2 host key: SHA256:JnldTEla20ZF/c5LdIqo9251DzO742k3hFCQh3Jt4ZA (1024)
Related Commands
Notes



show ssh server host-keys


show ssh server host-keys

Displays SSH host key configuration.

Syntax DescriptionN/A
DefaultN/A
Configuration ModeAny command mode
History8.0.0100
Example
gateway (config) # show ssh server host-keys
SSH server configuration:
SSH server enabled: yes
Server security strict mode: no
Minimum protocol version: 2
TCP forwarding enabled: yes
X11 forwarding enabled: no
SSH login timeout: 120
SSH login max attempts: 6
SSH server ports: 22

Interface listen enabled: yes
Listen Interfaces: No interface configured.

Host Key Finger Prints and Key Lengths:
RSA v2 host key: SHA256:gVu6qLW1ZifEp8wRer2jkvILZMGNl6VCYU3HqC1INC8 (2048)
DSA v2 host key: SHA256:JnldTEla20ZF/c5LdIqo9251DzO742k3hFCQh3Jt4ZA (1024)

Host Keys:
RSA v2 host key: "kebo-2100-1 ssh-rsa AAAAB3Nza<...>KE5"
DSA v2 host key: "kebo-2100-1 ssh-dss AAAAB3Nza<...>/s="
Related Commandsssh server host-keys
Notes

RSA2 and a DSA2 host keys are generated by default. The RSA2 key can be used as SSH server and client, while DSA2 key can only be used as SSH client. When the gateway is a server, use RSA key to connect to the Skyway device. When the gateway is a client (e.g., downloading image or uploading logs), RSA key is recommended. DSA key is only for legacy devices and has been deprecated by OpenSSH starting with the 7.0 release.



show ssh server login record-period


show ssh server login record-period

Displays the amount of days for counting the number of successful logins.

Syntax DescriptionN/A
Default30 days
Configuration ModeAny command mode
History8.0.0100
Example
gateway (config) # show ssh server login record-period 
SSH server login record-period: 1
Related Commandsssh server login record-period
Notes

Remote Login

telnet


telnet

Logs into another system using telnet.

Syntax DescriptionN/A
DefaultN/A
Configuration Modeconfig
History8.0.0100
Example
gateway (config) # telnet
telnet>
Related Commandstelnet-server
Notes

telnet-server enable


telnet-server enable
no telnet-server enable

Enables the telnet server.
The no form of the command disables the telnet server.

Syntax DescriptionN/A
DefaultTelnet server is disabled
Configuration Modeconfig
History8.0.0100
Example
gateway (config) # telnet-server enable
Related Commands

telnet-server
show telnet-server

Notes

show telnet-server


show telnet-server

Displays telnet server settings.

Syntax DescriptionN/A
DefaultN/A
Configuration Modeconfig
History8.0.0100
Example
gateway (config) # show telnet-server
Telnet server enabled: yes
Related Commands

telnet-server
show telnet-server

Notes