How to REMOVE an ssh key from a Summit Xxxx in extreme OS 21

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
Hey, I inadvertently
uploaded a bad public key for my user account.   (and to associate with
admin account)

Try as I might, I cannot "fix" it.  I can't find a
way to delete it, and re-uploading the correct key has no effect - I still have the bad key embedded...

Any ideas who I might talk to about this?   I've just spend HOURS pouring over the documentation and googling my brains out..  Can't find the solution.

Thanks for your time - not a big deal, but irritating, none the less..

Sincerely,

-ET-


* 
sae89sw.1 # show config "exsshd"
#
# Module exsshd configuration.
#
enable ssh2 vr VR-Mgmt
create sshd2 user-key cloyce AAAAB3NzaC1kc3MAAACBAN0b5n7/PjTdbNQXoa28YJj8a2n9mz7tvu69XMm9OlpljfsG+j4EtDEB2YP5xXIg2aN6h/w1zO85eevNNvvBDXiTgeecDpD/XqxpHChvWq9nb0blEI6TRduB6WKb2iZscJHLMIHV0GHopAYtN0W1lQZeNpdxx5uajBIUQ00/rPWLAAAAFQDR4iSfQDhlURYXcp8vC2Yuu78hgQAAAIArVrkgA1L6FlBTvqREuDiwHcQtS7l4hYD3pDtNN06agSQFNnO7/fz9igOfiosfuIf/Gebqw8p7qOk9+DPH0NWg3gk8oUpWjp+B+Xz9eX1PK3312h5JXfVboFRLkJ514/uv7mYf4BqC6CzJtHSgsVHd4lTHPYd+oA3q0pbyCPjqOwAAAIBlMeX7URJimWcn5IX43i0DcXRI1fUkgJgLXHLc2LeQJfuWrLHSIhJVeI/rE6F/dyMEMbcffWx6RWadAnJEpn2Evdil5Gsm03SUxAPhLiFbjhOrjM/qEZU7ZzLXoHDL6N4clvO4CWnAHlGWa+eNF09F3yROYz7jJCJFfGiGojh61Q==
create sshd2 user-key etimberl AAAAB3NzaC1yc2EAAAABIwAAAIEA3+vUV+odhvt5rhEWnOSr9/Cv6WwpjZ8UgJgy80yFKDFRx4pSvSsraes7oNic6fF9Xjrc7oIOcU1YrJIMjEtuSsOasgk3q7SB6mnYb0O5prLy1rxCbTdWtMrCRa0JakDEnsksyCkcRHMW3Y6zsg8pICFR6xlkXKJJcmTqafsoAhk=
create sshd2 user-key mdennis AAAAB3NzaC1kc3MAAACBAPv6mj6d6BGVVbmw//wrFkHheOX5MXOAVM2A8nayvFplQpKTndjTC1LmzGLeliXTQtBND1eF89DluUM4p55Ti2wEWAn7oItOra35qEefIdxHv21BaodL1PMqqeJp03jnjektRVHO6OwuNJReJorvtA3ARHcNgsjrBSwP7iUZbpXBAAAAFQD9II/1mFtbs/Npv3o4dbvr0rnR/QAAAIEA1XAvfKtq5+SlkUQ68vCcUEUQYXXVJkZHAmaAGZjkhstc6TQ3yQ1ExJy6UefSc91+5Sed2hkM67/uUoGlNtmK/N/5hdQEbcQUDtox6DkgHFXny2PUBs2geutI/QF2e80tgKrUTO318lS2wHHk6D5kZkqyASswu5XzSjVVvFjcbgUAAACAXPlKLK68F8SPw+C6QGHUYqjO7Aq8DgA7cRRVcZT/14VoANZPz2ccoEGqPEl6CleMbA8EZr71tjH/Yy6nEGZOaDI73HspL6kQN3ihTEjN9mYZxw5hv2HDYiOa9fUxZJv6McITxLWM+HWgBb56CkwjoekE0vGEMWd4ODN0pUeKhTA=
configure sshd2 user-key cloyce add user admin
configure sshd2 user-key etimberl add user admin
configure sshd2 user-key mdennis add user admin
configure ssh2 idletimeout none
* sae89sw.2 #


That is the INCORRECT KEY.. my bad, but perhaps I can over write it and start over again?


sae89sw.21 # scp 
etimberl@10.196.232.10:/home/etimberl/.ssh/id_rsa.pub.eric_main_public_key
 etimberl.ssh
Download  to /config/etimberl.ssh on switch
Password:
Connected to 10.196.232.10.
Fetching /home/etimberl/.ssh/id_rsa.pub.eric_main_public_key to /config/etimberl.ssh
/home/etimberl/.ssh/id_rsa.pub.eric_main_public_key                                                                                                          100%  405     0.4KB/s   00:00
sae89sw.22 #


That's the CORRECT key..  I've double checked on unrelated systems..

reboot the switch:

 reboot
Are you sure you want to reboot the switch? (y/N) Yes
Read from remote host sae89sw: Connection reset by peer
Connection to sae89sw closed.
[etimberl@saegw2:~]% ssh admin@sae89sw
Welcome to sae89sw, Authorized SAE sysadmin users ONLY!!
admin@sae89sw's password:
ExtremeXOS
Copyright (C) 1996-2016 Extreme Networks. All rights reserved.
This product is protected by one or more US patents listed at http://www.extremenetworks.com/patents along with their foreign counterparts.
==============================================================================
Press the <tab> or '?' key at any time for completions.
Remember to save your configuration changes.
 sae89sw.1 # show config "exsshd"
# Module exsshd configuration.
#
enable ssh2 vr VR-Mgmt
create sshd2
user-key cloyce
AAAAB3NzaC1kc3MAAACBAN0b5n7/PjTdbNQXoa28YJj8a2n9mz7tvu69XMm9OlpljfsG+j4EtDEB2YP5xXIg2aN6h/w1zO85eevNNvvBDXiTgeecDpD/XqxpHChvWq9nb0blEI6TRduB6WKb2iZscJHLMIHV0GHopAYtN0W1lQZeNpdxx5uajBIUQ00/rPWLAAAAFQDR4iSfQDhlURYXcp8vC2Yuu78hgQAAAIArVrkgA1L6FlBTvqREuDiwHcQtS7l4hYD3pDtNN06agSQFNnO7/fz9igOfiosfuIf/Gebqw8p7qOk9+DPH0NWg3gk8oUpWjp+B+Xz9eX1PK3312h5JXfVboFRLkJ514/uv7mYf4BqC6CzJtHSgsVHd4lTHPYd+oA3q0pbyCPjqOwAAAIBlMeX7URJimWcn5IX43i0DcXRI1fUkgJgLXHLc2LeQJfuWrLHSIhJVeI/rE6F/dyMEMbcffWx6RWadAnJEpn2Evdil5Gsm03SUxAPhLiFbjhOrjM/qEZU7ZzLXoHDL6N4clvO4CWnAHlGWa+eNF09F3yROYz7jJCJFfGiGojh61Q==
create sshd2 user-key etimberl
AAAAB3NzaC1yc2EAAAABIwAAAIEA3+vUV+odhvt5rhEWnOSr9/Cv6WwpjZ8UgJgy80yFKDFRx4pSvSsraes7oNic6fF9Xjrc7oIOcU1YrJIMjEtuSsOasgk3q7SB6mnYb0O5prLy1rxCbTdWtMrCRa0JakDEnsksyCkcRHMW3Y6zsg8pICFR6xlkXKJJcmTqafsoAhk=
create
sshd2 user-key mdennis
AAAAB3NzaC1kc3MAAACBAPv6mj6d6BGVVbmw//wrFkHheOX5MXOAVM2A8nayvFplQpKTndjTC1LmzGLeliXTQtBND1eF89DluUM4p55Ti2wEWAn7oItOra35qEefIdxHv21BaodL1PMqqeJp03jnjektRVHO6OwuNJReJorvtA3ARHcNgsjrBSwP7iUZbpXBAAAAFQD9II/1mFtbs/Npv3o4dbvr0rnR/QAAAIEA1XAvfKtq5+SlkUQ68vCcUEUQYXXVJkZHAmaAGZjkhstc6TQ3yQ1ExJy6UefSc91+5Sed2hkM67/uUoGlNtmK/N/5hdQEbcQUDtox6DkgHFXny2PUBs2geutI/QF2e80tgKrUTO318lS2wHHk6D5kZkqyASswu5XzSjVVvFjcbgUAAACAXPlKLK68F8SPw+C6QGHUYqjO7Aq8DgA7cRRVcZT/14VoANZPz2ccoEGqPEl6CleMbA8EZr71tjH/Yy6nEGZOaDI73HspL6kQN3ihTEjN9mYZxw5hv2HDYiOa9fUxZJv6McITxLWM+HWgBb56CkwjoekE0vGEMWd4ODN0pUeKhTA=
configure sshd2 user-key cloyce add user
admin
configure sshd2
user-key etimberl add user admin
configure sshd2 user-key mdennis add user admin
configure ssh2 idletimeout none
* sae89sw.2 #
Same "incorrect" key?  How do I remove this key and start over again?

I'm stumped!
Photo of Eric Timberlake

Eric Timberlake

  • 120 Points 100 badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Karthik Mohandoss

Karthik Mohandoss, Employee

  • 5,998 Points 5k badge 2x thumb
Hi Eric,

Welcome to the Hub...

You can use the below command to delete the user-key.

"Switch.1 # delete sshd2 user-key <key_name>"
Photo of Eric Timberlake

Eric Timberlake

  • 120 Points 100 badge 2x thumb
Thanks!  That worked perfectly, and PROBABLY is obvious in the documentation and I just didn't see it..

Appreciate your time!

-ET-
Photo of Ryan Mathews

Ryan Mathews, Alum

  • 8,988 Points 5k badge 2x thumb
That's what the Hub is here for Eric.  It takes a Community to run a modern network. 

Thanks for your trust in Extreme and as Karthik said -- Welcome to the Hub!  We're glad you joined us.