You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am building application similar to github where user can dump their public key on my server than can authenticate it. I wanted to added user specific data on runtime based on if key is registered or not with my application (basically check in key database).
I tried testing with hardcoded values:
`key := "ssh-rsa AAAA"
newAuthorizedKey, _, _, _, err := ssh.ParseAuthorizedKey(b)
if err != nil {
fmt.Println(err)
return
}
But these keys don't match with what we get in session.Publickey()
Is it something to do with algoritms..
I see session.Publickey - ssh-ed25519 while one on my system in ssh-rsa
How can I make them compatible?
Any help is really appreciated !!
The text was updated successfully, but these errors were encountered:
I am building application similar to github where user can dump their public key on my server than can authenticate it. I wanted to added user specific data on runtime based on if key is registered or not with my application (basically check in key database).
I tried testing with hardcoded values:
`key := "ssh-rsa AAAA"
newAuthorizedKey, _, _, _, err := ssh.ParseAuthorizedKey(b)
if err != nil {
fmt.Println(err)
return
}
authorizedKey := ssh.MarshalAuthorizedKey(newAuthorizedKey)
fmt.Println(fmt.Sprintf("%s", authorizedKey))
`
But these keys don't match with what we get in
session.Publickey()
Is it something to do with algoritms..
I see session.Publickey -
ssh-ed25519
while one on my system inssh-rsa
How can I make them compatible?
Any help is really appreciated !!
The text was updated successfully, but these errors were encountered: