bhushanQA has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl #use strict refs; #use warnings; use Expect; use Net::SSH::Expect; my $ssh = Net::SSH::Expect-> new ( host => "MYHOST", password => "user123", user => "user123", raw_pty => 1, log_file => "log_file" # this line actually got my head spinn +ing in right direction ); my $login_output=$ssh->login(); sleep 1; my $output=$ssh->exec("pwd"); warn "$output\n"; $ssh->exec("/sbin/fuser -k 9090/tcp"); my $output1=$ssh->exec("cd /home/tecnomen/JanusSIM2.0"); warn "$output1\n"; $ssh->exec("javac Atsi2.java"); sleep 1; warn "starting the ATSI script\n"; my $output3=$ssh->exec("java Atsi2 &"); sleep 10; warn"$output3\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::SSH::Expect --> Process is quite after exiting from program.
by salva (Canon) on Feb 14, 2017 at 09:38 UTC | |
|
Re: Net::SSH::Expect --> Process is quite after exiting from program.
by marto (Cardinal) on Feb 14, 2017 at 09:20 UTC |