Skip to content

Commit c9cf5ee

Browse files
committed
[debug]
1 parent 141f286 commit c9cf5ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

components/ws-proxy/pkg/sshproxy/server.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ func ReportSSHAttemptMetrics(err error) {
166166
return
167167
}
168168
errorType := "OTHERS"
169-
if serverAuthErr, ok := err.(ssh.ServerAuthError); ok && len(serverAuthErr.Errors) > 0 {
169+
if serverAuthErr, ok := err.(*ssh.ServerAuthError); ok && len(serverAuthErr.Errors) > 0 {
170+
fmt.Println(serverAuthErr, "-=======")
171+
fmt.Println(serverAuthErr.Errors, "-=======")
170172
if authErr, ok := serverAuthErr.Errors[len(serverAuthErr.Errors)-1].(SSHError); ok {
171173
errorType = authErr.ShortName()
172174
}

0 commit comments

Comments
 (0)