Cisco Nexus 5000 Series Switch CLI Software Configuration Guide (OL-16597-01, July 2009)

To disable the SSH server to prevent SSH access to the switch, perform this task:
Procedure
PurposeCommand or Action
Enters configuration mode.switch# configure terminal
Step 1
Disables the SSH server. The default is enabled.switch(config)# no feature ssh
Step 2
Exits global configuration mode.switch(config)# exit
Step 3
(Optional)
Displays the SSH server configuration.
switch# show ssh server
Step 4
(Optional)
Copies the running configuration to the startup
configuration.
switch# copy running-config
startup-config
Step 5
Deleting SSH Server Keys
You can delete SSH server keys after you disable the SSH server.
To reenable SSH, you must first generate an SSH server key.Note
To delete the SSH server keys, perform this task:
Procedure
PurposeCommand or Action
Enters configuration mode.switch# configure terminal
Step 1
Disables the SSH server.switch(config)# no feature ssh
Step 2
Deletes the SSH server key.switch(config)# no ssh key [dsa | rsa]
Step 3
The default is to delete all the SSH keys.
Exits global configuration mode.switch(config)# exit
Step 4
(Optional)
Displays the SSH server configuration.
switch# show ssh key
Step 5
(Optional)
Copies the running configuration to the startup
configuration.
switch# copy running-config
startup-config
Step 6
Clearing SSH Sessions
To clear SSH sessions from the Cisco Nexus 5000 Series switch, perform this task:
Cisco Nexus 5000 Series Switch CLI Software Configuration Guide
274 OL-16597-01
Configuring SSH and Telnet
Deleting SSH Server Keys