Disable no keypair login.

This commit is contained in:
Andrey Petrov 2014-12-16 19:39:32 -08:00
parent f957079489
commit bb0c8e9e49

View File

@ -81,7 +81,7 @@ func NewServer(privateKey []byte) (*Server, error) {
return perm, nil return perm, nil
}, },
KeyboardInteractiveCallback: func(conn ssh.ConnMetadata, challenge ssh.KeyboardInteractiveChallenge) (*ssh.Permissions, error) { 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) config.AddHostKey(signer)