mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-13 15:47:17 +03:00
Disable no keypair login.
This commit is contained in:
parent
f957079489
commit
bb0c8e9e49
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user