Wednesday 17 October 2018

ssh - Windows powershell screen equivalent


I am using a windows machine as a ssh server. I want to remotely run some tasks which takes several hours to finish. Is there any way to have persistent process even after remote ssh session is disconnected in Powershell?



Answer



After some experimentation, now I have replaced ssh with PowerShell Remoting.


Especially, START A REMOTE JOB THAT KEEPS THE RESULTS ON THE REMOTE COMPUTER section of the about_Remote_Jobs has been really helpful.


Basically, my current workflow is



  1. Open a new PSSession

  2. Invoke a command (Invoke-Command) on the remote server as a job, with Start-Job


Then I can freely Disconnect from the session and later reconnect to the session and get the job outputs with Receive-Job.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...