1

How to execute a command with SSH in WinSCP and exit without interrupting the command ?

I just do not want to wait for command to end, because it take to many hours. And after i will execute the command i want to close the winscp but the command to be running on server. Is this possible, how to do this ?

1

1 Answer 1

2

You can try using a screen session.

In general to obtain such a behavior you should call a remote command like this:

ssh root@remoteserver screen -d -m ./somescript

I don't know if it's implemented in WinSCP options but for sure you can fire a custom command.

Sign up to request clarification or add additional context in comments.

3 Comments

You can just run screen ... directly from WinSCP (Console window or Command Line panel)
@MartinPrikryl So when i tried using screen as a replacement for using background process'&'(winscp.net/forum/viewtopic.php?t=10060), i got a message "Must be connected to a terminal". Are u sure screen is supported in winscp command line automation?
Okay...i got it...its working fine with -d -m options which i missed earlier

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.