Posted on April 26, 2019 6:54 pm
 |  Asked by Nilesh Bhadane
 |  93 views
0
0
Print Friendly, PDF & Email

HI,

I have ansible installed on my machine.
I have added device name inside the host file. I have generated a key using ssh-keygen.

But getting an error while copying the key to the lab00.arista.com Arista device using command ssh-copy-id -i lab.device.com
Error attached in the file.

Can you please help me with this?

Thanks,
Nilesh

Attachments:
0
Posted by Himanshu Singh
Answered on April 29, 2019 9:45 am

Hi Nilesh,

Can you please try the following and see if it works:
$ ssh-copy-id -f -i root@

Thanks and regards,
Himanshu

Giving the same error

> exec sh -c ‘cd ; umask 077 ; mkdir -p .ssh && cat >> .ssh/authorized_keys || exit 1 ; if type restorecon >/dev/null 2>&1 ; then restorecon -F .ssh .ssh/authorized_keys ; fi’
% Invalid input at line 1

(Nilesh Bhadane at April 29, 2019 7:51 pm)
0
Answered on May 7, 2019 3:23 pm

Step 1
On your local machine :ssh-keygen -t rsa -b 4096

Step 2
From your local machine :scp ~/.ssh/id_rsa.pub dwarf@IP:/mnt/flash/dwarf_rsa.pub

Step 3
On the Arista node: username dwarf sshkey file flash:dwarf_rsa.pub

Post your Answer

You must be logged in to post an answer.