cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3805
Views
0
Helpful
2
Replies

Nexus 7K, getting invalid SSH key format allways

STEFFEN NEUSER
Level 4
Level 4

Hello,

I tried to establish an preshared SSH key at an Nexus 7K using the procedure for Nx5K (because I didnt found for 7k)

http://www.cisco.com/en/US/docs/switches/datacenter/nexus5000/sw/security/503_n1_1/Cisco_n5k_security_config_gd_rel_503_n1_1_chapter6.html

But I always get an "invalid SSH key format" after binding the user to the key.

SCNexus7KA(config)# username admin sshkey bootflash:/pem1024.pub

invalid SSH key format

SCNexus7KA(config)# username admin sshkey bootflash:/pem2048.pub

invalid SSH key format

...

the same error with providing the key as LINE

finaly I checked it with using exact the same key as seen in this documentation and the system still returns:

"invalid SSH key format"

What is the right procudure and key-format to establish an preshared SSH key connection with Nexus 7K?

thx, Steffen

2 Replies 2

anikas
Cisco Employee
Cisco Employee

Have you looked at these documents?

http://www.cisco.com/en/US/docs/switches/datacenter/sw/4_1/nx-os/security/configuration/guide/sec_ssh.html#wp1060683

http://www.cisco.com/en/US/docs/switches/datacenter/sw/5_x/nx-os/configuration_examples/configuration/guide/Cisco_Nexus_7000_Series_NX-OS_Configuration_Examples_Release_5.x_chapter4.html#task_1060807

http://www.cisco.com/en/US/docs/switches/datacenter/sw/4_1/nx-os/security/configuration/guide/sec_ssh.html

Sent from Cisco Technical Support iPhone App

Problem is solved, it was at NX5K as well. Its mainly caused by a documentation bug:

2) Bind the sshkey to an existing nexus user. Take care that you exactly use the

first 2 words of the generated pubkey, allthough the key consists of 3 words:

Nexus7KA(config)# username admin sshkey ssh-rsa AAAAB3Nz...

Nexus7KA(config)# sh user-account admin

user:admin

this user account has no expiry date

roles:network-operator

ssh public key: ssh-rsa AAAAB3Nz....

Important hint: In the Cisco-SSH documentation you will see:

"username User1 sshkey ssh-rsa

AAAAB3Nz..."

That is no new-line. It is a blanc:

"ssh-rsa AAAAB3Nz…"

and caused by an unfortunate accident with auto wrap at the most important part

of the documentation.

Steffen

Von: anikas

Gesendet: Mittwoch, 16. November 2011 05:23

An: Neuser, Steffen

Betreff: - Re: Nexus 7K, getting invalid SSH key format allways

Home<>

Re: Nexus 7K, getting invalid SSH key format allways

created by anikas<> in Other Data Center Subjects - View the full discussion<>

Review Cisco Networking for a $25 gift card