multiple public keys with docker plugin?
pschiffe opened this issue · 4 comments
pschiffe commented
Hello, I'm struggling to use multiple public keys in sshpiper.authorized_keys
docker label with docker plugin. Single public key works fine, but as soon as I add second one, divided by newline, ie:
$ cat authorized_keys
ssh-ed25519 A...K some@key
ssh-ed25519 A...D other@key
$ base64 -w 0 authorized_keys
c3....lcgo=
sshpiper fails with error:
time="2023-12-12T14:52:28Z" level=error msg="cannot create upstream for 10.1.0.2:60304 (username [user]) with public key auth: rpc error: code = Unknown desc = illegal base64 data at input byte 259"
What do you think? How to define multiple keys?
tg123 commented
could you please paste base64 code? looks like a decoding error
pschiffe commented
sure, this is an output from docker inspect:
"Labels": {
"sshpiper.authorized_keys": "c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSUNxRjhFZER2bGZoUFNGSUxqczlMZHJJRFBhY1RuRHNIWTJZcWJCRGRLb2ggcHNjaGlmZmVAejE2CnNzaC1lZDI1NTE5IEFBQUFDM056YUMxbFpESTFOVEU1QUFBQUlHaFgwZ3RQYnZZbWR0elFZS1lwcjkrK1VBUXBjSkJMWm92cFN3U2phdU9OIHBzY2hpZmZlQHoxNgo=",
....
}
tg123 commented
mb, lol typo and my original case did not catch it, fixed
pschiffe commented
awesome, thank you <3