Ohh ...I did not mention that I am calling from perl script... using NET::SSH::PERL
so its fairly simple
the shell script which i want to run is 'snap.sh', which itself calls lots of stuff and gives the output/status of those one by one.. so I want the same thing to be seen on my server where I am running perl script as the shell script is running...
Comment on Re^2: SSH OUTPUT WITHOUT ENDING OF COMMAND
If you are on a Linux/Unix system, you can use Net::OpenSSH:
use Net::OpenSSH;
my $ssh = Net::OpenSSH->new('foo@host');
$ssh->error and die "unable to connect: " . $ssh->error;
my $pipe = $ssh->pipe_out("snap.sh");
while(<$pipe>) {
print $_;
}