From 11e92b57180cb5e89051432589af0940a4e32c34 Mon Sep 17 00:00:00 2001 From: Andrey Petrov Date: Sat, 10 Jan 2015 17:27:55 -0800 Subject: [PATCH] Fixed key storage. --- sshd/auth.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sshd/auth.go b/sshd/auth.go index 339d158..3cf0855 100644 --- a/sshd/auth.go +++ b/sshd/auth.go @@ -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 },