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

Dynamically import Public Keys from a Linux host to a Cisco router

JUANNN
Spotlight
Spotlight

Hello,

I am doing a little lab with SSH over Public Key authentication, using a Linux host (Centos Stream 10) and a Cisco router (C112X-8PLTEPW). 

I have successfully generated the key-pair on the Linux host, then manually copy it and paste it on the Cisco router under:

ip ssh pubkey-chain

 username juan

  key-string

  paste the public key

So far so good, I tried SSH from the host, entered the passphrase and works good.

But this implies manually copying each public key of every client to the Cisco router... this is not very practical. With Linux, I use 

$ssh-copy -id juan@X.X.X.X to dynamically copy the public key to the SSH Server over an SSH connection using password authentication. But I have tried it with the Cisco router and I get the following errror:

JUANNN_0-1749253411602.png

As far as I know, the Linux host usually copies the public key to the SSH Server "authorized_keys" file, but I believe this does not exist in the Cisco router, and the filesystems are different also... or does the file exist under another name?

Would I have target the private-config file of the NVRAM and write there the new public keys?

Anyone knows if is possible to dynamically push the public keys to the Cisco router?

Thanks,

Juan

0 Replies 0