text
stringlengths
0
6.55k
4 Command Prompt 3 Approved! AAA
Telnet or SSH RADIUS or TACACS+
Figure 6-4 Basic Authentication Process with an External AAA Server
While the figure shows the general idea, note that the information flows with a couple of different protocols. On the left, the connection between the user and the switch or
router uses Telnet or SSH. On the right, the switch and AAA server typically use either the RADIUS or TACACS+ protocol, both of which encrypt the passwords as they traverse the network.
Securing Remote Access with Secure Shell
So far, this chapter has focused on the console and on Telnet, mostly ignoring SSH. Telnet has one serious disadvantage: all data in the Telnet session flows as clear text, including the password exchanges. So, anyone that can capture the messages between the user and the switch (in what is called a man-in-the-middle a...
SSH can use the same local login authentication method as Telnet, with the locally con-figured username and password. (SSH cannot rely on authentication methods that do not include a username, like shared passwords.) So, the configuration to support local usernames for Telnet, as shown previously in Figure 6-3, also en...
Figure 6-5 shows one example configuration of what is required to support SSH. The figure repeats the local username configuration as shown earlier in Figure 6-3, as used for Telnet. Figure 6-5 shows three additional commands required to complete the configuration of SSH on the switch.
|||||||||||||||||||| Technet24
||||||||||||||||||||
Chapter 6: Configuring Basic Switch Management 137
User Mode (sw1>)
SSH
SSH-Specific Configuration
hostname sw1
ip domain-name example.com
! Next Command Uses FQDN “sw1.example.com” crypto key generate rsa
Local Username Configuration (Like Telnet)
username wendell secret odom username chris secret youdda !
line vty 0 15 login local
Figure 6-5 Adding SSH Configuration to Local Username Configuration
IOS uses the three SSH-specific configuration commands in the figure to create the SSH encryption keys. The SSH server uses the fully qualified domain name (FQDN) of the switch
as input to create that key. The switch creates the FQDN from the hostname and domain
name of the switch. Figure 6-5 begins by setting both values (just in case they are not 6
already configured). Then the third command, the crypto key generate rsa command, gener-ates the SSH encryption keys.
The configuration in Figure 6-5 relies on two default settings that the figure therefore conve-niently ignored. IOS runs an SSH server by default. In addition, IOS allows SSH connections into the vty lines by default.
Seeing the configuration happen in configuration mode, step by step, can be particularly helpful with SSH configuration. Note in particular that in this example, the crypto key com-mand prompts the user for the key modulus; you could also add the parameters modulus modulus-value to the end of the crypto key command to ...
Example 6-5 SSH Configuration Process to Match Figure 6-5
SW1# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
!
! Step 1 next. The hostname is already set, but it is repeated just
! to be obvious about the steps.
!
SW1(config)# hostname SW1
SW1(config)# ip domain-name example.com
SW1(config)# crypto key generate rsa
The name for the keys will be: SW1.example.com
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.
||||||||||||||||||||
||||||||||||||||||||
138 CCNA 200-301 Official Cert Guide, Volume 1
How many bits in the modulus [512]: 1024
% Generating 1024 bit RSA keys, keys will be non-exportable...
[OK] (elapsed time was 4 seconds)
SW1(config)#
!
! Optionally, set the SSH version to version 2 (only) - preferred
!
SW1(config)# ip ssh version 2
!
! Next, configure the vty lines for local username support, just like
! with Telnet
!
SW1(config)# line vty 0 15
SW1(config-line)# login local