Fixed key storage.

This commit is contained in:
Andrey Petrov committed 2015-01-10 17:27:55 -08:00
1 parent d5626b7514
commit 11e92b5718
1 file changed
+2 -2
+2 -2
View File
@@ -27,7 +27,7 @@ func MakeAuth(auth Auth) *ssh.ServerConfig {
return nil, err
}
perm := &ssh.Permissions{Extensions: map[string]string{
"pubkey": string(ssh.MarshalAuthorizedKey(key)),
"pubkey": string(key.Marshal()),
}}
return perm, nil
},
@@ -50,7 +50,7 @@ func MakeNoAuth() *ssh.ServerConfig {
// Auth-related things should be constant-time to avoid timing attacks.
PublicKeyCallback: func(conn ssh.ConnMetadata, key ssh.PublicKey) (*ssh.Permissions, error) {
perm := &ssh.Permissions{Extensions: map[string]string{
"pubkey": string(ssh.MarshalAuthorizedKey(key)),
"pubkey": string(key.Marshal()),
}}
return perm, nil
},