Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Command-line Windows SFTP server

Yes schtasks should work. But WinSCP Session.ExecuteCommand needs Linux shell. It won't work with Windows shell and Windows command. WinSCP is primarily an SFTP client. It's not the right tool to execute commands on SSH server.
hendra

Re: Command-line Windows SFTP server

martin wrote:

It makes no sense to execute a GUI application in an SSH session. What do you expect it to do? Did you think it will open the GUI application in the interactive Windows session? It cannot. The SSH and interactive sessions are isolated.


what if i start application like schtasks, that not interactive/GUI application. its like sqldump isn't it??
martin

Re: Command-line Windows SFTP server

It makes no sense to execute a GUI application in an SSH session. What do you expect it to do? Did you think it will open the GUI application in the interactive Windows session? It cannot. The SSH and interactive sessions are isolated.
hendra

Re: Command-line Windows SFTP server

martin wrote:

Yes, Windows SFTP/SSH server is SFTP/SSH server as any other.


when i execute this string:
session.ExecuteCommand("cmd /c start calc.exe").Check()

it took a long time,even though the result is an error :
Connection has been unexpectedly closed. Server sent command exit status 0.

in log it write :
< 2020-05-04 10:23:10.836 [Shell] 

it look like the command is not recognized.
martin

Re: Command-line Windows SFTP server

Yes, Windows SFTP/SSH server is SFTP/SSH server as any other.
hendra

Command-line Windows SFTP server

help, is winscp support access windows sftp server.
can i use windows command to run
session.executecommand
??
such as cmd /c start, chkdsk, schtasks /create.
thanks