Purpose
Command or Action
switch(config)# username User1 sshkey file
bootflash:secsh_file.pub
Exits global configuration mode.
exit
Example:
Step 4
switch(config)# exit
switch#
Displays the user account configuration.
(Optional)
show user-account
Example:
Step 5
switch# show user-account
Copies the running configuration to the startup
configuration.
(Optional)
copy running-config startup-config
Example:
Step 6
switch# copy running-config startup-config
Specifying the SSH Public Keys in OpenSSH Format
You can specify the SSH public keys in OpenSSH format for user accounts.
Before you begin
Generate an SSH public key in OpenSSH format.
SUMMARY STEPS
1.
configure terminal
2.
username username sshkey ssh-key
3.
exit
4.
(Optional)
show user-account
5.
(Optional)
copy running-config startup-config
DETAILED STEPS
Purpose
Command or Action
Enters global configuration mode.
configure terminal
Example:
Step 1
switch# configure terminal
switch(config)#
Configures the SSH public key in OpenSSH format.
username username sshkey ssh-key
Example:
Step 2
switch(config)# username User1 sshkey
ssh-rsa
AAAAB3NzaC1yc2EAAAABIwAAAIEAy19oF3f1XswK3OiW4H7YyUyuA50rv7gsEPj
hOBYmsi6PAVKui1nIf/DQhum+lJNqJP/eLlVKRXFY/G+lJNIQW3g9ig
XVn+NjnI1B7ihvpVh7dLddMOXwOnXHYshXmSiH3UD/vKyziEh5S4Tplx8=
Cisco Nexus 9000 Series NX-OS Security Configuration Guide, Release 9.x
133
Configuring SSH and Telnet
Specifying the SSH Public Keys in OpenSSH Format