Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to run a remote command on an SSH server via the Remote command field of the PuTTY Configuration dialog (Connection -> SSH) and every time I do the window closes before I've had a chance to read the output of that command.

Here's a screenshot:

http://www.snapfiles.com/screenfiles/putty2.gif

Any ideas?

share|improve this question
    
why dont you login and run the command regularly? – Ali Hashemi Nov 21 '13 at 8:57

Simply add a read to your command, for example:

uptime && read

This will show the output of uptime and then waits for you to press the enter key.

share|improve this answer
    
That works great unless you're connecting to something like a switch or router or something that might not have read as a command. – neubert Nov 21 '13 at 20:09

putty has a setting to do exactly what you want: http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter4.html#config-closeonexit

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .