It fails for me at
type $env:USERPROFILE.ssh\id_rsa.pub | ssh 192.168.1.100 “cat >> .ssh/authorized_keys”
"type : Der Pfad “C:\Users\XXX.ssh\id_rsa.pub” kann nicht gefunden werden, da er nicht vorhanden ist."
(The path “C:\Users\XXX.ssh\id_rsa.pub” can’t be found, because it is not existing)
Ok there is something odd with Powershell.
When I type in the command
ssh-keygen -t rsa -b 4096 I get this output:
Enter file in which to save the key (C:\Users\XXX/.ssh/id_rsa):
So when I just put in a filename it can’t be saved, because of the forward slashes in the default path, Powershell gives me, I guess.
I have to specify a full path, then it can save the keys.
I used now open-ssh and convertet them with putty-gen.
But I used a passphrase for the key, so now it was prompting me for the passphrase everytime, when I was connecting
But simple solution (on windows): double click the .ppk file and type in the phrase once, it will be stored and now no passphrase is needed on connection.