Re: Scripting In Putty Error



On May 14, 10:37 am, Richard.Hornber...@xxxxxxxxxxxxxxx wrote:
Hi All,
I'm trying desperitly to write code that will work for Putty. Long
story short, I'm trying to write a batch file that will launch Putty
and read a script file which will run a series of commands. My setup
in the batch script is as follows:

putty.exe -ssh xxx.xxx.xxx.xxx -l Username -pw Password -m lc.txt

Then, within the contents of the text file I have the following:

ena
"Enable Password"
configure terminal
interface eth 0/17
shutdown
exit
interface eth 0/23
shutdown
exit
exit
exit

It dosn't even get to executing my text file and I recieve the
following:

Server refused to start a shell/command.

Bump, Please Help!

.



Relevant Pages

  • Re: CreateProcess not working as doc specifies.
    ... > to modify the batch files to make it work. ... simply setting exit at the end causes the terminal window to ... Hector Santos, Santronics Software, Inc. ... BOOL MakeSkeleton(const char *szTemp, const char *szClient) ...
    (microsoft.public.win32.programmer.kernel)
  • Re: exit /b does not work properly in subroutines
    ... Also why exit without /b switch exits entire batch, ... echo This line should never be reached ... within a batch to exit current batch and set ERRORLEVEL to 1. ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: exit /b does not work properly in subroutines
    ... I see - /b switch is required to exit batch. ... echo This line should never be reached ... within a batch to exit current batch and set ERRORLEVEL to 1. ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: exit /b does not work properly in subroutines
    ... Please have a look at two batch files: they only differ in one line (exit ... echo This line should never be reached ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: cmd batch file question
    ... Exit quits the CMD.EXE program (command interpreter) or the current batch ... This question was posted individually to multiple groups. ... I don't use cmd.exe very much and I don't write batch files very often. ...
    (microsoft.public.windowsxp.help_and_support)