The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter describes the Secure Shell (SSH) feature. The SSH feature consists of an application and a protocol.
Your software release may not support all the features documented in this module. For the latest feature information and caveats, see the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the "Feature Information for Configuring Secure Shell" section.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.
•Prerequisites for Configuring SSH
•Restrictions for Configuring SSH
•Information About Secure Shell
•Monitoring and Maintaining SSH
•Feature Information for Configuring Secure Shell
Prior to configuring SSH, perform the following tasks:
•Download the required image on your router. (The SSH server requires you to have an IPsec (DES or 3DES) encryption software image downloaded on your router; the SSH client requires you to have an IPsec (DES or 3DES) encryption software image downloaded on your router.) For more information on downloading a software image, see the Cisco IOS XE Configuration Fundamentals Configuration Guide, Release 2.
•Configure a host name and host domain for your router.
To configure a host name and host domain, enter the hostname hostname and ip domain-name domainname commands in global configuration mode:
•Generate an RSA key pair for your router, which automatically enables SSH.
To generate an RSA key pair, enter the crypto key generate rsa command.
Note To delete the RSA key-pair, use the crypto key zeroize rsa global configuration command. Once you delete the RSA key-pair, you automatically disable the SSH server.
•Configure user authentication for local or remote access. You can configure authentication with or without AAA. For more information on AAA, see the Authentication, Authorization, and Accounting chapters in the Cisco IOS XE Security Configuration Guide: Securing User Services, Release 2 and the Cisco IOS Security Command Reference.
•RSA authentication available in SSH clients is not supported in the SSH server for Cisco IOS XE software.
•SSH server and SSH client are supported on DES (56-bit) and 3DES (168-bit) data encryption software images only.
•Execution shell is the only application supported.
•The login banner is not supported in Secure Shell Version 1. It is supported in Secure Shell Version 2.
Secure Shell (SSH) is an application and a protocol that provide a secure replacement to the Berkeley r-tools. The protocol secures the sessions using standard cryptographic mechanisms, and the application can be used similarly to the Berkeley rexec and rsh tools. There are currently two versions of SSH available: SSH Version 1 and SSH Version 2. This document describes SSH Version 1. For information about SSH Version 2, see the "Secure Shell Version 2 Support" document.
Note Hereafter, unless otherwise noted, the term "SSH" will denote "SSH Version 1" only.
•Related Features and Technologies
•Related Features and Technologies
•Prerequisites for Configuring SSH
The SSH Server feature enables a SSH client to make a secure, encrypted connection to a Cisco router. This connection provides functionality that is similar to that of an inbound Telnet connection. Before SSH, security was limited to Telnet security. SSH allows a strong encryption to be used with the Cisco IOS XE software authentication. The SSH server in Cisco IOS XE software will work with publicly and commercially available SSH clients.
The SSH Integrated Client feature is an application running over the SSH protocol to provide device authentication and encryption. The SSH client enables a Cisco router to make a secure, encrypted connection to another Cisco router or to any other device running the SSH server. This connection provides functionality that is similar to that of an outbound Telnet connection except that the connection is encrypted. With authentication and encryption, the SSH client allows for a secure communication over an insecure network.
The SSH client in the Cisco IOS XE software works with publicly and commercially available SSH servers. The SSH client supports the ciphers of Data Encryption Standard (DES), Triple DES (3DES), and password authentication. User authentication is performed like that in the Telnet session to the router. The user authentication mechanisms supported for SSH are RADIUS, TACACS+ and the use of locally stored user names and passwords.
Note The SSH client functionality is available only when the SSH server is enabled.
For more information about SSH-related features and technologies, review the following:
•Authentication, Authorization, and Accounting (AAA) feature. AAA is a suite of network security services that provide the primary framework through which access control can be set up on your Cisco router or access server. For more information on AAA, see the Authentication, Authorization, and Accounting chapters in the Cisco IOS XE Security Configuration Guide: Securing User Services, Release 2 and the Cisco IOS Security Command Reference.
•IP Security (IPsec) feature. IPsec is a framework of open standards that provides data confidentiality, data integrity, and data authentication between participating peers. IPsec provides these security services at the IP layer. IPsec uses Internet Key Exchange (IKE) to handle negotiation of protocols and algorithms based on local policy and to generate the encryption and authentication keys to be used by IPsec. IPsec can be used to protect one or more data flows between a pair of hosts, between a pair of security gateways, or between a security gateway and a host. For more information on IPsec, see the chapter "Configuring Security for VPNs with IPsec" and the Cisco IOS Security Command Reference.
The following sections describe the configuration tasks for SSH. Each task in the list is identified as either optional or required.
•Configuring SSH Server (Required)
•Verifying SSH (Optional)
See the section "SSH Configuration Examples" at the end of this chapter.
Note The SSH client feature runs in user EXEC mode and has no specific configuration on the router.
Note The SSH commands are optional and are disabled when the SSH server is disabled.
To enable and configure a Cisco Router for SSH, you can configure SSH parameters. If you do not configure SSH parameters, the default values will be used.
To configure SSH server, use the following command in global configuration mode:
To verify that the SSH server is enabled and view the version and configuration data for your SSH connection, use the show ip ssh command. The following example shows that SSH is enabled:
Router# show ip ssh
SSH Enabled - version 1.5
Authentication timeout: 120 secs; Authentication retries: 3
The following example shows that SSH is disabled:
Router# show ip ssh
%SSH has not been enabled
To verify the status of your SSH server connections, use the show ssh command. The following example shows the SSH server connections on the router when SSH is enabled:
Router# show ssh
Connection Version Encryption State Username
0 1.5 3DES Session Started guest
The following example shows that SSH is disabled:
Router# show ssh
%No SSH server connections running.
•If your SSH configuration commands are rejected as illegal commands, you have not successfully generated a RSA key pair for your router. Make sure you have specified a host name and domain. Then use the crypto key generate rsa command to generate a RSA key pair and enable the SSH server.
•When configuring the RSA key pair, you might encounter the following error messages:
–No hostname specified
You must configure a host name for the router using the hostname global configuration command. For more information, see "Prerequisites for Configuring SSH."
–No domain specified
You must configure a host domain for the router using the ip domain-name global configuration command. For more information, see "Prerequisites for Configuring SSH."
•The number of allowable SSH connections is limited to the maximum number of vtys configured for the router. Each SSH connection will use a vty resource.
•SSH uses either local security or the security protocol that is configured through AAA on your router for user authentication. When configuring AAA, you must ensure that AAA is disabled on the console for user authentication. AAA authorization is disabled on the console by default. If AAA authorization is enabled on the console, disable it by configuring the no aaa authorization console command during the AAA configuration stage.
To monitor and maintain your SSH connections, use the following commands in user EXEC mode:
|
|
---|---|
Router# show ip ssh |
Displays the version and configuration data for SSH. |
Router# show ssh |
Displays the status of SSH server connections. |
This section provides the following configuration example showing output from the show running configuration EXEC command on a Cisco ASR1000 Series Aggregation Services Router.
•SSH on a Cisco ASR1000 Series Router Example
Note The crypto key generate rsa command is not displayed in the show running configuration output.
In the following example, SSH is configured on a Cisco ASR1000 series router with a timeout that is not to exceed 60 seconds, and no more than 2 authentication retries. Also, before configuring the SSH server feature on the router, TACACS+ is specified as the method of authentication.
hostname RouterASR1K
aaa new-model
aaa authentication login default tacacs+
aaa authentication login aaa7200kw none
enable password enableasr1kpw
username username1 password 0 password1
username username2 password 0 password2
ip subnet-zero
no ip domain-lookup
ip domain-name cisco.com
! Enter the ssh commands.
ip ssh time-out 60
ip ssh authentication-retries 2
ip route 192.168.1.0 255.255.255.0 10.1.10.1
ip route 192.168.9.0 255.255.255.0 10.1.1.1
ip route 192.168.10.0 255.255.255.0 10.1.1.1
map-list atm
ip 10.1.10.1 atm-vc 7 broadcast
no cdp run
tacacs-server host 192.168.109.216 port 9000
tacacs-server key cisco
radius-server host 192.168.109.216 auth-port 1650 acct-port 1651
radius-server key cisco
line con 0
exec-timeout 0 0
login authentication aaa7200kw
transport input none
line aux 0
line vty 0 4
password enableasr1kpw
end
|
|
---|---|
Cisco IOS commands |
|
Security commands |
|
AAA configuration |
The following chapters of the Cisco IOS XE Security Configuration Guide: Securing User Services, Release 2: |
IPSec configuration |
|
|
---|---|
No new or modified MIBs are supported by this feature, and support for existing MIBs has not been modified by this feature. |
— |
|
|
---|---|
No new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature. |
— |
Table 1 lists the features in this module and provides links to specific configuration information.
Use Cisco Feature Navigator to find information about platform support and software image support. Cisco Feature Navigator enables you to determine which software images support a specific software release, feature set, or platform. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.
Note Table 1 lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
|
|
|
---|---|---|
Secure Shell SSH Version 1 Integrated Client |
Cisco IOS XE Release 2.1 |
The SSH Version 1 Integrated Client feature is an application running over the SSH protocol to provide device authentication and encryption. In Cisco IOS XE Release 2.1, this feature was introduced on Cisco ASR 1000 Series Aggregation Services Routers. The following sections provide information about this feature: •Information About Secure Shell |
Secure Shell SSH Version 1 Server Support |
Cisco IOS XE Release 2.1 |
The SSH Version 1 Server Support feature enables a SSH client to make a secure, encrypted connection to a Cisco router. In Cisco IOS XE Release 2.1, this feature was introduced on Cisco ASR 1000 Series Routers. The following sections provide information about this feature: •Information About Secure Shell |