Step 5 Specify the SSH public key in OpenSSH format.
Example:
switch(config)# username User1 sshkey ssh-rsa
AAAAB3NzaC1yc2EAAAABIwAAAIEAy19oF6QaZl9G+3f1XswK3OiW4H7YyUyuA50r
v7gsEPjhOBYmsi6PAVKui1nIf/DQhum+lJNqJP/eLowb7ubO+lVKRXFY/G+lJNIQ
W3g9igG30c6k6+XVn+NjnI1B7ihvpVh7dLddMOXwOnXHYshXmSiH3UD/vKyziEh5
4Tplx8=
Step 6 Save the configuration.
Example:
switch(config)# copy running-config startup-config
Configuration Example for SSH Passwordless File Copy
The following example shows how to copy files from a Cisco NX-OS device to a secure copy (SCP) or secure
FTP (SFTP) server without a password:
Step 1 Generate the SSH public and private keys and store them in the home directory of the Cisco NX-OS device for the
specified user.
Example:
switch# configure terminal
switch(config)# username admin keypair generate rsa
generating rsa key(1024 bits)......
generated rsa key
Step 2 Display the public key for the specified user.
Example:
switch(config)# show username admin keypair
**************************************
rsa Keys generated: Thu Jul 9 11:10:29 2013
ssh-rsa
AAAAB3NzaC1yc2EAAAABIwAAAIEAxWmjJT+oQhIcvnrMbx2BmD0P8boZElTfJ
Fx9fexWp6rOiztlwODtehnjadWc6A+DE2DvYNvqsrU9TBypYDPQkR/+Y6cKubyFW
VxSBG/NHztQc3+QC1zdkIxGNJbEHyFoajzNEO8LLOVFIMCZ2Td7gxUGRZc+fbq
S33GZsCAX6v0=
bitcount:262144
fingerprint:
8d:44:ee:6c:ca:0b:44:95:36:d0:7d:f2:b5:78:74:7d
**************************************
could not retrieve dsa key information
**************************************
Cisco Nexus 9000 Series NX-OS Security Configuration Guide, Release 9.x
151
Configuring SSH and Telnet
Configuration Example for SSH Passwordless File Copy