The Secure Shell Protocol (SSH) server feature enables a SSH client to make a secure, encrypted connection to a Cisco Nexus device. SSH uses strong encryption for authentication. The SSH server in the Cisco Nexus device switch interoperates with publicly and commercially available SSH clients.
The user authentication mechanisms supported for SSH are RADIUS, TACACS+, and the use of locally stored user names and passwords.
SSH Client
The SSH client feature is an application running over the SSH protocol to provide device authentication and encryption. The SSH client enables a switch to make a secure, encrypted connection to another Cisco Nexus device or to any other device running an SSH server. This connection provides an outbound connection that is encrypted. With authentication and encryption, the SSH client allows for a secure communication over an insecure network.
The SSH client in the Cisco Nexus device works with publicly and commercially available SSH servers.
SSH Server Keys
SSH requires server keys for secure communications to the Cisco Nexus device. You can use SSH keys for the following SSH options:
SSH version 2 using Rivest, Shamir, and Adelman (RSA) public-key cryptography
SSH version 2 using the Digital System Algrorithm (DSA)
Be sure to have an SSH server key-pair with the appropriate version before enabling the SSH service. You can generate the SSH server key-pair according to the SSH client version used. The SSH service accepts three types of key-pairs for use by SSH version 2:
The dsa option generates the DSA key-pair for the SSH version 2 protocol.
The rsa option generates the RSA key-pair for the SSH version 2 protocol.
By default, the Cisco Nexus device generates an RSA key using 1024 bits.
SSH supports the following public key formats:
OpenSSH
IETF Secure Shell (SECSH)
Caution
If you delete all of the SSH keys, you cannot start the SSH services.
Telnet Server
The Telnet protocol enables TCP/IP connections to a host. Telnet allows a user at one site to establish a TCP connection to a login server at another site, and then passes the keystrokes from one system to the other. Telnet can accept either an IP address or a domain name as the remote system address.
The Telnet server is enabled by default on the Cisco Nexus device.
Guidelines and Limitations for SSH
SSH has the following configuration guidelines and limitations:
The Cisco Nexus device supports only SSH version 2 (SSHv2).
Configuring SSH
Generating SSH Server Keys
You can generate an SSH server key based on your security requirements. The default SSH server key is an RSA key that is generated using 1024 bits.
The bits argument is the number of bits used to generate the key. The range is from 768 to 2048 and the default value is 1024.
Use the force keyword to replace an existing key.
Step 3
switch(config)# exit
Exits global configuration mode.
Step 4
switch# show ssh key
(Optional)
Displays the SSH server keys.
Step 5
switch# copy running-config startup-config
(Optional)
Copies the running configuration to the startup configuration.
The following example shows how to generate an SSH server
key:
switch# configure terminal
switch(config)# ssh key rsa 2048
switch(config)# exit
switch# show ssh key
switch# copy running-config startup-config
Specifying the SSH Public Keys for User Accounts
You can configure an SSH public key to log in using an SSH client without being prompted for a password. You can specify the SSH public key in one of three different formats:
By default, the Telnet server is enabled. You can
disable the Telnet server on your
Cisco Nexus device.
SUMMARY STEPS
1.switch#
configure terminal
2.switch(config)#
feature telnet
DETAILED STEPS
Command or Action
Purpose
Step 1
switch#
configure terminal
Enters configuration mode.
Step 2
switch(config)#
feature telnet
Disables the Telnet server. The default is
enabled.
Reenabling the Telnet Server
If the Telnet server on your
Cisco Nexus device has been disabled, you can reenable it.
SUMMARY STEPS
1.switch(config)#
feature telnet
DETAILED STEPS
Command or Action
Purpose
Step 1
switch(config)#
feature telnet
Reenables the Telnet server.
Starting Telnet Sessions to Remote Devices
Before you start a Telnet session to connect to remote devices, you should do the following:
Obtain the hostname for the remote device and, if needed, obtain the username on the remote device.
Enable the Telnet server on the Cisco Nexus device.
Enable the Telnet server on the remote device.
SUMMARY STEPS
1.switch# telnethostname
DETAILED STEPS
Command or Action
Purpose
Step 1
switch# telnethostname
Creates a Telnet session to a remote device. The hostname argument can be an IPv4 address, an IPv6 address, or a device name.
The following example shows how to start a Telnet session to connect to a remote device:
switch# telnet 10.10.1.1
Trying 10.10.1.1...
Connected to 10.10.1.1.
Escape character is '^]'.
switch login:
Clearing Telnet Sessions
You can clear Telnet sessions from the Cisco Nexus device.
SUMMARY STEPS
1.switch# show users
2.switch# clear linevty-line
DETAILED STEPS
Command or Action
Purpose
Step 1
switch# show users
Displays user session information.
Step 2
switch# clear linevty-line
Clears a user Telnet session.
Verifying the SSH and Telnet
Configuration
To display the SSH configuration information,
perform one of the following tasks:
switch#
show ssh key [dsa |
rsa]
Displays SSH server key-pair information.
switch#
show running-config
security [all]
Displays the SSH and user account configuration
in the running configuration. The
all keyword displays the default values for the SSH and user
accounts.
switch#
show ssh server
Displays the SSH server configuration.
switch#
show user-account
Displays user account information.
Default Settings for SSH
The following table lists the default settings for
SSH parameters.