mirror of
https://github.com/rclone/rclone.git
synced 2025-01-08 23:40:29 +01:00
serve sftp: fix generation of server keys on windows
This commit is contained in:
parent
ada6a92c8b
commit
894a5a1a83
@ -239,14 +239,14 @@ func (s *server) serve() (err error) {
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to create cache path")
|
||||
}
|
||||
if strings.HasSuffix(keyPath, "/id_rsa") {
|
||||
if strings.HasSuffix(keyPath, string(os.PathSeparator)+"id_rsa") {
|
||||
const bits = 2048
|
||||
fs.Logf(nil, "Generating %d bit key pair at %q", bits, keyPath)
|
||||
err = makeRSASSHKeyPair(bits, keyPath+".pub", keyPath)
|
||||
} else if strings.HasSuffix(keyPath, "/id_ecdsa") {
|
||||
} else if strings.HasSuffix(keyPath, string(os.PathSeparator)+"id_ecdsa") {
|
||||
fs.Logf(nil, "Generating ECDSA p256 key pair at %q", keyPath)
|
||||
err = makeECDSASSHKeyPair(keyPath+".pub", keyPath)
|
||||
} else if strings.HasSuffix(keyPath, "/id_ed25519") {
|
||||
} else if strings.HasSuffix(keyPath, string(os.PathSeparator)+"id_ed25519") {
|
||||
fs.Logf(nil, "Generating Ed25519 key pair at %q", keyPath)
|
||||
err = makeEd25519SSHKeyPair(keyPath+".pub", keyPath)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user