Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion managedserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ func (m ManagedServer) Start(port int, rawPrivateKeys [][]byte, ciphers, macs []
MACs: macs,
},
PasswordCallback: func(c ssh.ConnMetadata, pass []byte) (*ssh.Permissions, error) {
m.lg.InfoD("handshake-failure-username-password", meta{"username": c.User()})
driver = m.driverGenerator(LoginRequest{
Username: c.User(),
Password: string(pass),
Expand All @@ -117,6 +118,7 @@ func (m ManagedServer) Start(port int, rawPrivateKeys [][]byte, ciphers, macs []
return nil, nil
},
PublicKeyCallback: func(c ssh.ConnMetadata, key ssh.PublicKey) (*ssh.Permissions, error) {
m.lg.InfoD("handshake-failure-username-publickey", meta{"username": c.User()})
driver = m.driverGenerator(LoginRequest{
Username: c.User(),
Password: "",
Expand All @@ -136,7 +138,7 @@ func (m ManagedServer) Start(port int, rawPrivateKeys [][]byte, ciphers, macs []
_, newChan, requestChan, err := ssh.NewServerConn(conn, config)
if err != nil {
if err != io.EOF {
m.errorAndAlert("handshake-failure", meta{"error": err.Error()})
m.errorAndAlert("handshake-failure", meta{"error": err.Error(), "IP": conn.RemoteAddr()})
}
return
}
Expand Down