CLI Reference Guide-R07

Table Of Contents
Chapter 8
| Authentication Commands
Secure Shell
– 245 –
Configuration Guidelines
The SSH server on this switch supports both password and public key
authentication. If password authentication is specified by the SSH client, then the
password can be authenticated either locally or via a RADIUS or TACACS+ remote
authentication server, as specified by the authentication login command. If public
key authentication is specified by the client, then you must configure
authentication keys on both the client and the switch as described in the following
section. Note that regardless of whether you use public key or password
authentication, you still have to generate authentication keys on the switch and
enable the SSH server.
To use the SSH server, complete these steps:
1. Generate a Host Key Pair – Use the ip ssh crypto host-key generate command to
create a 2048-bit RSA host public/private key pair.
2. Provide Host Public Key to Clients – Many SSH client programs automatically
import the host public key during the initial connection setup with the switch.
Otherwise, you need to manually create a known hosts file on the management
station and place the host public key in it. An entry for a public key in the
known hosts file would appear similar to the following example:
10.1.0.54 1024 35 15684995401867669259333946775054617325313674890836547254
15020245593199868544358361651999923329781766065830956
108259132128902337654680172627257141342876294130119619556678259566410486957427
888146206519417467729848654686157177393901647793559423035774130980227370877945
4524083971752646358058176716709574804776117
3. Import Clients Public Key to the Switch – Use the copy tftp public-key
command to copy a file containing the public key for all the SSH clients
granted management access to the switch. (Note that these clients must be
configured locally on the switch with the username command.) The clients are
subsequently authenticated using these keys. The RSA key lengths can be in
the range of 1024 to 2048 bits. The current firmware only accepts public key
files based on standard UNIX format as shown in the following example for an
RSA key:
1024 35
134108168560989392104094492015542534763164192187295892114317388005553616163105
177594083868631109291232226828519254374603100937187721199696317813662774141689
851320491172048303392543241016379975923714490119380060902539484084827178194372
288402533115952134861022902978982721353267131629432532818915045306393916643
steve@192.168.1.19
4. Set the Optional Parameters – Set other optional parameters, including the
authentication timeout and the number of retries.
5. Enable SSH Service – Use the ip ssh server command to enable the SSH server
on the switch.