02-29-2024 01:51 AM
We want to upload the configuration backup .json file(s) of the APIC cluster with scp to a remote location using a public key.
I have tried to enter the public key in OpenSSH format, but I get an error.
What format does the public key need to be ?
The documentation says you need a public key.
The input field says "private keys"... which is it ?
Solved! Go to Solution.
04-04-2024 09:15 PM
found the solution
steps:
1. login to ur apic in cli and give below command
apic1# ssh-keygen -t rsa -b 2048 -m PEM
Generating public/private rsa key pair.
Enter file in which to save the key (/home/admin/.ssh/id_rsa):
/home/admin/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/admin/.ssh/id_rsa
Your public key has been saved in /home/admin/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:RPlKAKQ2EoyK8KTsF348/YJF1IgR1+dKn70Ul1G3HjQ admin@apic1
The key's randomart image is:
+---[RSA 2048]----+
|+ .o++.=. E+|
|oo.. .o+.o . ..+|
|*++ ....o oo|
|++.o o.... ..o.|
|. . o o.S.o o o. |
| . o + o.. o o |
| . . + . . . |
| . . . . |
| . |
+----[SHA256]-----+
apic1#
now append the content of /home/admin/.ssh/id_rsa.pub to remote server in "~/.ssh/authorized_keys" file
copy & paste the content of /home/admin/.ssh/id_rsa to the "Use SSH Private Key Files" field
now it should work
03-18-2024 08:41 AM
Yeah.. wired. Searched internally, but not much related information gathered. I recommend you open a TAC ticket for further checking on this if it impacts your business or service.
Thanks.
04-04-2024 09:15 PM
found the solution
steps:
1. login to ur apic in cli and give below command
apic1# ssh-keygen -t rsa -b 2048 -m PEM
Generating public/private rsa key pair.
Enter file in which to save the key (/home/admin/.ssh/id_rsa):
/home/admin/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/admin/.ssh/id_rsa
Your public key has been saved in /home/admin/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:RPlKAKQ2EoyK8KTsF348/YJF1IgR1+dKn70Ul1G3HjQ admin@apic1
The key's randomart image is:
+---[RSA 2048]----+
|+ .o++.=. E+|
|oo.. .o+.o . ..+|
|*++ ....o oo|
|++.o o.... ..o.|
|. . o o.S.o o o. |
| . o + o.. o o |
| . . + . . . |
| . . . . |
| . |
+----[SHA256]-----+
apic1#
now append the content of /home/admin/.ssh/id_rsa.pub to remote server in "~/.ssh/authorized_keys" file
copy & paste the content of /home/admin/.ssh/id_rsa to the "Use SSH Private Key Files" field
now it should work
04-09-2024 06:10 AM
That worked indeed. Thanks !
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide