Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Public key on windows machine to ~/.ssh/authorized_keys format
New on LowEndTalk? Please Register and read our Community Rules.

Public key on windows machine to ~/.ssh/authorized_keys format

I am probably being stupid but if a client sends me a public key file which looks like:

---- BEGIN SSH2 PUBLIC KEY ----
Comment: "rsa-key-20170118"
AAAAd3NzaC1yc2EAAAABJQAAAQEAl3cTBx1TvQDtgyk0Jtgl0FhMCPRGs11/jwGk
q4kFjRqwraqum3SnbXl3ItsqDbPQwcfewHPPBxtMk8LpVQ6tRik481U2x+jkP3Q2
WWnLvvgIlsCrah7s35/Dwgr0h5PyvUnkKhLbeCh0IxFbHfHzwHdrNFUWzfAKsQLR
qu328kpio0W7MLtcw0HfbHdSquAKK6URJV6tsmDHYkO7+3bYhXhw0Sviri8L/Ksp
W6A/1JxVA833GbsbWykP6EZ0AfaTrHSfR/z2MgaL2RqCGbFIpt0Q+KP5NoIGHBOK
F7s8Qefh6oRUthMAGK7Whq78QUHCM5b6pqj/0iJba9EZaa41qQ==
---- END SSH2 PUBLIC KEY ----

What is the best way to get this into the correct format and into an ~/.ssh/authorized_keys format. I always end up having to manually edit it and then cut and paste it to the format.

ssh-rsa AAAAd3NzaC1yc2EAAAABJQAAAQEAl3cTBx1TvQDtgyk0Jtgl0FhMCPR.....

Would be great is there was a command which would allow me to upload it onto the server and would then copy it into the ~/.ssh/authorized_keys and it would put it in the right format.

Any help greatly appreciated.

Comments

Sign In or Register to comment.