0

How to add public key to servers authorized_keys file if i use it on Windows (cat command does not work simply) and i know how to add with scp command or with sftp and it's work fine but the problame is this is overwrite the current keys to new. I would like to add an secound key and i want to do it on secure.

I tred it but it dont find the directory root.

C:>type C:/Users/User/.ssh/id_rsa.pub | plink.exe -ssh user@host -pw "password" "cat >> Users/User/.ssh/authorized_keys"

  • I'm a Linux person, so can't answer it definitively, but SSH keys are text. You can open it, copy, paste and save in a plain text editor (like notepad) – davidgo Mar 29 '20 at 00:17
  • Yes it is work perfectly. Just i want to know how to do with ssh. when use SSH layer protocols it overwrite it instead of paste it on the following line. But i can solve it as you suggested. Unfortunately i need to use ssh for copy and paste – Norbert Pozsonyi Mar 29 '20 at 10:50

0 Answers0