Actually, "one-time-download" is not a feature of the SFTP protocol - it's an addition implemented on top of it by your server vendor, and although it doesn't modify existing SFTP commands, it limits actions that can be done. It's not a bug or feature, it's just the way this particular server works when accessing files like this one.
This said, GetStream can actually be used for "one-time-download" files as long as you don't try to determine their length or other information. And I'm not quite sure why Stream.CopyTo needs to determine the file length - perhaps using something like this instead would solve the problem:
public static void Copy(Stream input, Stream output)
{
int bufferSize = 32 * 1024;
byte[] buffer = new byte[bufferSize];
while (true)
{
int n = input.Read(buffer, 0, bufferSize);
if (n == 0)
break;
output.Write(buffer, 0, n);
}
}
The GetFile and MemoryStream approach works because GetFile doesn't try to determine the file length (unless you registered a TransferProgressChanged event). However, please be aware that if you need to work with very long files, storing them in MemoryStream might become problematic (it needs to be able to allocate a continuous block of memory, which might fail even when there is plenty of free memory available).