Merge pull request #314 from manu0401/windows_openssh

Windows native OpenSSH fix
This commit is contained in:
Haoxi Tan 2024-11-30 08:25:19 +10:00 committed by GitHub
commit ef94977c5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 0 deletions

View File

@ -1227,6 +1227,13 @@ static int start_ssh(struct conn *conn)
fprintf(stderr, "\n");
}
#if defined(__CYGWIN__)
/*
* Windows native OpenSSH stdio behavior. For details check
* https://github.com/PowerShell/openssh-portable/pull/759
*/
putenv("OPENSSH_STDIO_MODE=nonsock");
#endif
execvp(sshfs.ssh_args.argv[0], sshfs.ssh_args.argv);
fprintf(stderr, "failed to execute '%s': %s\n",
sshfs.ssh_args.argv[0], strerror(errno));