remote: Use SFTP over SCP for uploading files and directories (#40510)

Closes #37322

Uses SFTP if available, otherwise falls back to SCP for uploading files
and directories to remote. This fixes an issue on older macOS versions
where outdated SCP can throw an ambiguous target error.

Release Notes:

- Fixed an issue where extensions wouldn’t work when SSHing into a
remote from older macOS versions.
f2b966b139Smit Barmase committed on 10/19/2025, 6:31:43 PM· committed by GitHubparent4507110
1 file changedLine totals unavailable