Sending commands to new shell in Perl

M

mario.demiguel

I am trying to do the following in a Perl script:

ssh to a remote machine
once on the machine, switch to tcsh
once in tcsh, execute commands

I am a relative novice at Perl and would appreciate any help or
suggestions. Thanks in advance!
 
J

J. Gleixner

I am trying to do the following in a Perl script:

ssh to a remote machine
once on the machine, switch to tcsh
once in tcsh, execute commands

Take a look at the Expect module on CPAN (http://search.cpan.org/).
Also, using one of the many search engines first & frequently, probably
will save you a lot of time in the future.

Once you have read the documentation and tried to use it, then you can
post specific questions about your code.
I am a relative novice at Perl and would appreciate any help or
suggestions. Thanks in advance!

No need to state the obvious. :)
 
R

Robert Gamble

I am trying to do the following in a Perl script:

ssh to a remote machine
once on the machine, switch to tcsh
once in tcsh, execute commands

I am a relative novice at Perl and would appreciate any help or
suggestions. Thanks in advance!

Take a look at the Net::SSH::perl module on cpan.org

Robert Gamble
 
T

Tintin

I am trying to do the following in a Perl script:

ssh to a remote machine
once on the machine, switch to tcsh
once in tcsh, execute commands

What's the reliance on tcsh? Without knowing your requirements, it maybe a
simple as doing:

ssh user@remote command

Either invoked via system, or using one of the Perl SSH modules.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top