Team, i know this has been in discussion for long time. But i haven't got an answer searching entire web since yesterday. I need to run series of commands in windows after logging to an server running SSH server.

The problem is as you might have guessed being interactive.....

I can run one of commands bby lot of methods.. I will list what i have tried so that people can suggest something i don't know.

1. Net::SSH2 -- not supported in windows

2. Net:OpenSSH -- again not supported in windows

3. Install openSSH in widnows itself and using System and backticks to run dos commands. Yes Openssh can be installed in windows

without cgywin environment a discovery i made yesterday.

4. IPC::Cmd, a tool similar to using system command but doesn't provide interactive session. Everytime you run new terminal session is spawned.

5. Ofcourse tried plain system and exec and backticks also turned futile. Worked liked a charm for single command run and shutoff.

6. IPC::Session, not avaiable in Active Perl i use and don't know how to install it currently. Supposedly provides for interactive session using terminal. Not been able to get it working..

7. plink tool is also good failing to work even when list of commands is fed to it externally. Cisco Box i am trying to SSH to is throwing illegal characters error. Weird right?

Any leads is appreciated..


In reply to Running interactive SSH session in windows by srinidhi27

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.