Putty - excute remote script and leave console open

3

I'm running the following command in windows console:

"C:\Putty\putty.exe" -load "mySavedSession1" -m C:\somePath\localScript.txt -v

localScript.txt content:

/somePath/update-new-ver.sh

the remote machine is Ubuntu and I want putty to run the remote script. If I run this /somePath/update-new-ver.sh in putty GUI on remote-command box, its working fine, but from windows console it just open and close putty real quick and I cant see if there is an exception thrown.

  1. How can I make putty to stay open when done?
  2. Am I running this remote script the right way?

Shoham

Posted 2015-06-17T08:17:42.770

Reputation: 133

possible duplicate of Putty: run a remote command after login & keep the shell running

– Martin Prikryl – 2015-06-17T08:36:35.100

Answers

1

Instead of using putty, i think you can use plink instead. With plink you shouldn't have the problem of the app closing down too quickly on you as this is a console app.

More info here: http://the.earth.li/~sgtatham/putty/0.53b/htmldoc/Chapter7.html

user55570

Posted 2015-06-17T08:17:42.770

Reputation: 440