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.