1

I want to use Net::SSH::Expect in my unix box but unfortunately, it is not available and I am not able to convince the admin to install any perl module. Do you know how could I connect to a remote server using expect. I know that I can archive that by using python but python is also not avai in my unix box. Second attempt: though I use expect and shell scripting but the output is missing which is my original problem :Missing output when running system command

Please advise me any alternative module of Net::SSH::Expect so I can check its availibility in my unix box. Or any other way to connect remote server, execute some command and get the output ? Million thanks.

Community
  • 1
  • 1
aladine
  • 963
  • 3
  • 12
  • 35

1 Answers1

2

You do not need your system administrator to install a module in order for you to run it. You can download and install it locally, and use local::lib to use it (as discussed in earlier questions on this site).

Alternatively, have you simply tried:

my $output = `ssh username@host command arguments`;
Community
  • 1
  • 1
Ether
  • 53,118
  • 13
  • 86
  • 159
  • Thanks! I try to install local::lib but unsuccessful. :(( The reason I need to use expect because the server will promt user and password subsequently. So I am seeking an alternative way of using ssh and expect. – aladine Apr 12 '10 at 09:54