Hi,
I'm not sure why you want a expect session for that. If it's not due to entering a password (which is not recommended anyway because you have to store it somewhere in your program) you could just simply call a subshell this way:
my $rc = system("ssh -i private.key myhost.mydomain.tld '/root/scripts +/restart.sh'");
McA
In reply to Re: Perl - running remote script doesn't return back the control to perl.
by McA
in thread Perl - running remote script doesn't return back the control to perl.
by bshah
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |