Add more debug logging
This commit is contained in:
parent
f127c624c0
commit
5370758c30
1 changed files with 4 additions and 0 deletions
|
|
@ -193,6 +193,8 @@ func (p *SkelPlugin) PasswordCallback(conn libplugin.ConnMetadata, password []by
|
|||
}
|
||||
|
||||
func (p *SkelPlugin) PublicKeyCallback(conn libplugin.ConnMetadata, publicKey []byte) (*libplugin.Upstream, error) {
|
||||
log.Infof("PublicKeyCallback called for user %s, key len=%d", conn.User(), len(publicKey))
|
||||
|
||||
pubKey, err := ssh.ParsePublicKey(publicKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
@ -272,11 +274,13 @@ func (p *SkelPlugin) PublicKeyCallback(conn libplugin.ConnMetadata, publicKey []
|
|||
}
|
||||
|
||||
// Pass the client's public key so their fingerprint can be included in the upstream username
|
||||
log.Infof("Creating upstream with client key len=%d", len(publicKey))
|
||||
u, err := p.createUpstreamWithClientKey(conn, to, nil, publicKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
log.Infof("Upstream created with username=%s", u.UserName)
|
||||
return u, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue