Make sure `kwargs=None` is properly handled. Fixes #16945.
Fix syntax error
Remove the "unknown" fallback
Merge pull request #16974 from s0undt3ch/hotfix/16945-sftp-opts

Make sure `kwargs=None` is properly handled. Fixes #16945.