Your shell is probably incompatible with the application (BASH is recommended)
Hello,
I have a powershell script. I am using sFTP.
The default shell in the target host is ksh. I want to execute a command:
I get this error: Your shell is probably incompatible with the application (BASH is recommended)
If I execute this command against a host where the default shell is /bin/bash, it works.
Question is: How can I direct sFTP to use ksh as the shell for the command execution?
Note:
I cannot change the default host from ksh to bash because it is a company policy and I have hundreds of hosts.
-rawsettings option shell, the documentation states is only for SCP protocol
https://winscp.net/eng/docs/rawsettings
Shell (SCP protocol)
In this post, someone suggested he/she can change the shell: "Oh, you know, looking through the options I changed the shell to /bin/ksh and it worked."
https://winscp.net/forum/viewtopic.php?t=4329
but does not explain how.
Regards, Raul.
I have a powershell script. I am using sFTP.
$sessionOptions = New-Object WinSCP.SessionOptions -Property @{ Protocol = [WinSCP.Protocol]::Sftp HostName = $hostname UserName = $config.Configuration.UserName SecurePassword = ConvertTo-SecureString $config.Configuration.Password }
The default shell in the target host is ksh. I want to execute a command:
$Command = "ls -ltr" $output = $session.ExecuteCommand($Command)
I get this error: Your shell is probably incompatible with the application (BASH is recommended)
If I execute this command against a host where the default shell is /bin/bash, it works.
Question is: How can I direct sFTP to use ksh as the shell for the command execution?
Note:
I cannot change the default host from ksh to bash because it is a company policy and I have hundreds of hosts.
-rawsettings option shell, the documentation states is only for SCP protocol
https://winscp.net/eng/docs/rawsettings
Shell (SCP protocol)
In this post, someone suggested he/she can change the shell: "Oh, you know, looking through the options I changed the shell to /bin/ksh and it worked."
https://winscp.net/forum/viewtopic.php?t=4329
but does not explain how.
Regards, Raul.