Disable no keypair login.

This commit is contained in:
Andrey Petrov committed 2014-12-16 19:39:32 -08:00
1 parent f957079489
commit bb0c8e9e49
1 file changed
+1 -1
+1 -1
View File
@@ -81,7 +81,7 @@ func NewServer(privateKey []byte) (*Server, error) {
return perm, nil
},
KeyboardInteractiveCallback: func(conn ssh.ConnMetadata, challenge ssh.KeyboardInteractiveChallenge) (*ssh.Permissions, error) {
return nil, nil
return nil, fmt.Errorf("Must have an SSH keypair to connect.")
},
}
config.AddHostKey(signer)