Ethernet Switches & Routers

New Contributor
Posts: 2
Registered: ‎07-16-2012

Unable to overwrite or clear $$sshpub.key on FCX Switch

Hello all,

I'm trying to overwrite a public key file on one of our FCX648S switches, but when I attempt to do so, it is coming up with the error below. Attempts to clear the public key are also unsuccessful. I've attempted the following

SSH@idf3(config)#ip ssh pub-key-file tftp pubkeys/pkeys.txt

downloading public key file, please wait...


Cannot write to ssh public key file $$sshpub.key.

ERROR: failed to write ssh client pub key to file $$sshpub.key

SSH@idf3(config)#clear public-key

SSH@idf3(config)#show dir

      1740 $$sshhost.key

       816 $$sshpub.key

         0 bootrom

   4869049 primary

   4866666 secondary

       163 stacking.boot

      7167 startup-config

      7077 startup-config.backup

   9752678 bytes 8 File(s)

  54394880 bytes free

Perhaps helpful to know is that when the public key file was first downloaded from a TFTP server, it was formatted incorrectly as follows:

SSH@idf3#copy flash console $$sshpub.key


ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCyYJNvVQIykYyjL5sPkbfavCyzetgXqd/h9mXz9E6JX31GsrtMuudTFz+lErKFpMxxmVc+SsMiX+qJhzd7T3wrUIAg4zml+brAteqb4GxHdx15UMBYqt2H091+OqfrWm5V0cv9PY/APAlmOVOXvi7KLCKLtgfU/WNQgb8ktCJg6DS6Df9AfhAHJX/DdVvyjucXdTMfH+S+j89Ae5qRsJ9dTgOC


4dJjFY7uMHS43Myv4daP8RxiwM0bxuhcPaTHle5HmFR2je0saeOI74Rub+A5bPGTR5W2eSoqBm1oU7fsloErJvTLJAfP5DyEgn4Xw16TkGH7tuojrtmnXnt908HZVkDX05AXv6iBXsgzox1JjLrjyWFLfRwznLfdyTExt553RLmtz6d0/IZmylcmAyipL3Mll+yffXv994mrqbAw== ted@teds-Macmini.local


Any help with removing or overwriting the public key file is greatly appreciated.

Super Contributor
Posts: 1,087
Registered: ‎12-13-2009

Re: Unable to overwrite or clear $$sshpub.key on FCX Switch

Hmm not sure, would suggest you try this from the console.  Not sure it will let change the ssh key while you are SSH into the back.

If that still does not works.  then suggest you turn off SSH access and try again and reenable SSH if that works.



New Contributor
Posts: 2
Registered: ‎07-16-2012

Re: Unable to overwrite or clear $$sshpub.key on FCX Switch

Thanks for your help.

We let this problem sit for a while, and it resolved itself after a code upgrade to FCXS07400.bin. I'm assuming that it was the warm reload as part of the upgrade that fixed it.

Join the Community

Get quick and easy access to valuable resource designed to help you manage your Brocade Network.