Secure Shell Commands

Use these commands to configure Secure Shell (SSH) access to the switch.

Use SSH to access the switch from a remote management host. The switch allows a maximum of 5 SSH sessions.

ip ssh

M4250

M4350

Use this command to enable SSH access to the system. (This command is the short form of the ip ssh server enable command.)

Default disabled
Format ip ssh
Mode Privileged EXEC

no ip ssh

This command disables the IP secure shell server. (This command is the short form of the no ip ssh server enable command.)

Format no ip ssh
Mode Privileged EXEC

ip ssh server enable

M4250

M4350

This command enables the IP secure shell server.

Default enabled
Format ip ssh server enable
Mode Privileged EXEC

no ip ssh server enable

This command disables the IP secure shell server. No new SSH connections are allowed, but the existing SSH connections continue to work until timed-out or logged-out.

Format no ip ssh server enable
Mode Privileged EXEC

ip ssh port

M4250

M4350

Use this command to configure the TCP port number on which the Secure Shell (SSH) server detects requests. The number argument can be a port number in the range from 1 to 65535.

Default 22
Format ip ssh port number
Mode Privileged EXEC

no ip ssh port

Use this command to reset the TCP port number on which the SSH server detects requests to the default of 22.

Format no ip ssh port
Mode Privileged EXEC

ip ssh pubkey-auth

M4250

M4350

Use this command to enable public key authentication for incoming SSH sessions.

Default Disabled
Format ip ssh pubkey-auth
Mode Privileged EXEC

no ip ssh pubkey-auth

Use this command to disable public key authentication, which prevents SSH access to the switch.

Format no ip ssh pubkey-auth
Mode Privileged EXEC

sshcon maxsessions

M4250

M4350

This command specifies the maximum number of SSH connection sessions that can be established. The number argument can be a number in the range from 0–5. A value of 0 indicates that no SSH connection can be established. The range is 0 to 5.

Default 5
Format sshcon maxsessions number
Mode Privileged EXEC

no sshcon maxsessions

This command sets the maximum number of allowed SSH connection sessions to the default value.

Format no sshcon maxsessions
Mode Privileged EXEC

sshcon timeout

M4250

M4350

This command sets the SSH connection session timeout value, in minutes. A session is active as long as the session has been idle for the value set. The time-out value unit of time is minutes and is specified by the minutes argument in the range 1–160 minutes.

Changing the timeout value for active sessions does not become effective until the session is re-accessed. Also, any keystroke activates the new time-out duration.

Default 5
Format sshcon timeout minutes
Mode Privileged EXEC

no sshcon timeout

This command sets the SSH connection session time-out value, in minutes, to the default.

Changing the time-out value for active sessions does not become effective until the session is re-accessed. Also, any keystroke activates the new time-out duration.

Format no sshcon timeout
Mode Privileged EXEC

ip ssh authentication-retries

M4250

M4350

Use this command to specify the maximum number of authentication retries allowed per SSH connection. You can set from 0 to 5 retries.

Default 3
Format ip ssh authentication-retries {0-5}
Mode Privileged EXEC

Command example:

CODE
(NETGEAR Switch) #ip ssh authentication-retries 2

no ip ssh authentication-retries

This command sets the maximum number of authentication retries to the default value.

Format no ip ssh authentication-retries
Mode Privileged EXEC

ip ssh server algorithm encryption

M4250

M4350

Use this command to specify the encryption algorithms used to establish the SSH connection. You must make at least one selection. If you select more than one option, the command defines the order of the encryption algorithms.

Default All encryption algorithms are enabled by default.
Format ip ssh server algorithm encryption {[aes128-ctr] [aes192-ctr] [aes256-ctr]}
Mode Privileged EXEC

Command example:

CODE
(NETGEAR Switch) #ip ssh server algorithm encryption aes128-ctr aes192-ctr

no ip ssh server algorithm encryption

Use this command to disable the encryption algorithm.

Format no ip ssh server algorithm encryption {[aes128-ctr] [aes192-ctr] [aes256-ctr]}
Mode Privileged EXEC

ip ssh server algorithm hostkey

M4250

M4350

Use this command to specify the host key algorithms used to establish the SSH connection. You must make at least one selection. If you select more than one option, the command defines the order of host key algorithms.

Default All hostkey algorithms are enabled by default.
Format ip ssh server algorithm hostkey {[ssh-rsa] [rsa-sha2-256] [rsa-sha2-512] [ecdsa-sha2-nistp256] [ecdsa-sha2-nistp384] [ecdsa-sha2-nistp521]}
Mode Privileged EXEC

Command example:

CODE
(NETGEAR Switch) #ip ssh server algorithm hostkey ssh-rsa ecdsa-sha2-nistp384

no ip ssh server algorithm hostkey

Use this command to disable the host key algorithm.

Format no ip ssh server algorithm hostkey {[ssh-rsa] [rsa-sha2-256] [rsa-sha2-512] [ecdsa-sha2-nistp256] [ecdsa-sha2-nistp384] [ecdsa-sha2-nistp521]}
Mode Privileged EXEC

ip ssh server algorithm mac

M4250

M4350

Use this command to specify the Message Authentication Code algorithms used to establish the SSH connection. You must make at least one selection. If you select more than one option, the command defines the order of the MAC algorithms.

Default All mac algorithms are enabled by default.
Format ip ssh server algorithm mac {[hmac-sha2-256] [hmac-sha2-256-etm@openssh.com] [hmac-sha2-512] [hmac-sha2-512-etm@openssh.com]}
Mode Privileged EXEC

Command example:

CODE
(NETGEAR Switch) #ip ssh server algorithm mac hmac-md5-etm@openssh.com hmac-sha2-256
hmac-sha1

no ip ssh server algorithm mac

Use this command to disable the mac algorithm.

Format no ip ssh server algorithm mac {[hmac-sha2-256] [hmac-sha2-256-etm@openssh.com] [hmac-sha2-512] [hmac-sha2-512-etm@openssh.com]}
Mode Privileged EXEC

ip ssh server algorithm kex

M4250

M4350

Use this command to specify the key exchange (Kex) algorithms used to establish the SSH connection. You must make at least one selection. If you select more than one option, the command defines the order of the Kex algorithms.

Default All Kex algorithms are enabled by default.
Format ip ssh server algorithm kex {[curve25519-sha256] [curve25519-sha256@libssh.org] [diffie-hellman-group-exchange-sha256] [diffie-hellman-group14-sha1] [diffie-hellman-group14-sha256] [diffie-hellman-group16-sha512] [diffie-hellman-group18-sha512] [ecdh-sha2-nistp256] [ecdh-sha2-nistp384] [ecdh-sha2-nistp521]}
Mode Privileged EXEC

Command example:

CODE
(NETGEAR Switch) #ip ssh server algorithm kex curve25519-sha256 ecdh-sha2-nistp384

no ip ssh server algorithm kex

Use this command to disable the key exchange algorithm.

Format no ip ssh server algorithm kex {[curve25519-sha256] [curve25519-sha256@libssh.org] [diffie-hellman-group-exchange-sha256] [diffie-hellman-group14-sha1] [diffie-hellman-group14-sha256] [diffie-hellman-group16-sha512] [diffie-hellman-group18-sha512] [ecdh-sha2-nistp256] [ecdh-sha2-nistp384] [ecdh-sha2-nistp521]}
Mode Privileged EXEC

line ssh

M4250

M4350

This command gives you access to the SSH Config mode (Config-ssh) for a virtual terminal for secured remote console access. This mode lets you configure the secure shell (SSH) settings.

Format line ssh
Mode Global Config

Command example:

CODE
(NETGEAR Switch)(config)#line ssh
(NETGEAR Switch)(Config-ssh)#

show ip ssh

M4250

M4350

This command displays the SSH settings.

Format show ip ssh
Mode Privileged EXEC
Term Definition
Administrative Mode This field indicates whether the administrative mode of SSH is enabled or disabled.
SSH Port The SSH port in use.
Protocol Level The protocol level shows the value of version 2.
SSH Sessions Currently Active The number of SSH sessions currently active.
Max SSH Sessions Allowed The maximum number of SSH sessions allowed.
SSH Timeout The SSH time-out value in minutes.
Keys Present Indicates if the SSH RSA, DSA, and ECDSA key files are present on the device. The length of the respective keys and the key encryption status (if the key is encrypted) are displayed in parentheses.
Key Generation in Progress Indicates if RSA, DSA, and ECDSA key files generation is currently in progress.
SSH Public Key Authentication Mode Indicates if login without a password is enabled for the SSH client.
SCP Server Administrative Mode Indicates if the SCP server is enabled on the switch. To allow file transfers from a host system to the switch using SCP push operations, the SCP server must be enabled.
Max SSH Authentication Tries The maximum number of authentication retries supported per SSH connection.
Encryption Algorithms The encryption algorithms used for the SSH connection.
MAC Algorithms The Message Authentication Code algorithms used for the SSH connection.
KEX Algorithms The Key Exchange algorithms that are used over the SSH connection.
HostKey Algorithms The host key algorithms that are used over the SSH connection.

Command example:

CODE
(NETGEAR Switch)#show ip ssh

SSH Configuration

Administrative Mode: .......................... Disabled
SSH Port: ..................................... 22
Protocol Level: ............................... Version 2
SSH Sessions Currently Active: ................ 0
Max SSH Sessions Allowed: ..................... 5
SSH Timeout (mins): ........................... 5
Keys Present: ................................. DSA(1024)
                                                RSA(2048)

Key Generation In Progress: ................... None
SSH Public Key Authentication Mode: ........... Disabled
SCP server Administrative Mode: ............... Disabled
Max SSH authentication tries:.................. 4
Encryption Algorithms:......................... aes128-ctr
                                                aes192-ctr
                                                aes256-ctr

MAC Algorithms:................................ hmac-sha2-256
                                                hmac-sha2-512
                                                hmac-sha2-256-etm@openssh.com
                                                hmac-sha2-512-etm@openssh.com

KEX Algorithms:................................ curve25519-sha256
                                                curve25519-sha256@libssh.org
                                                ecdh-sha2-nistp256
                                                ecdh-sha2-nistp384
                                                ecdh-sha2-nistp521
                                                diffie-hellman-group-exchange-sha256
                                                diffie-hellman-group16-sha512
                                                diffie-hellman-group18-sha512
                                                diffie-hellman-group14-sha256

HostKey Algorithms:............................ rsa-sha2-256
                                                rsa-sha2-512
                                                ecdsa-sha2-nistp256
                                                ecdsa-sha2-nistp384
                                                ecdsa-sha2-nistp521