impl hostkey verify for working dir

This commit is contained in:
Boshi Lian 2022-07-06 18:32:35 +00:00
parent bc9875c4b5
commit 3047473814
7 changed files with 140 additions and 90 deletions

View file

@ -68,7 +68,7 @@ func main() {
w := &workingdir.Workingdir{
Path: path,
NoCheckPerm: c.Bool("no-check-perm"),
Strict: c.Bool("strict-hostkey"),
Strict: false,
}
u, err := w.CreateUpstream()
@ -92,10 +92,6 @@ func main() {
return nil, fmt.Errorf("no matching public key found in %v", userdir)
},
VerifyHostKeyCallback: func(conn libplugin.ConnMetadata, key []byte) (bool, error) {
return true, nil
},
}, nil
},
})