use POE::Component::RemoteTail::CustomEngine::NetSSHPerl; use strict; use warnings; use Net::SSH::Perl; print STDERR "In NetSSHPerl...\n"; #Added by cmv sub process_entry { my $self = shift; my $arg = shift; my $host = $arg->{host}; my $path = $arg->{path}; my $user = $arg->{user}; my $password = $arg->{password}; my $cmd = "tail -f $path"; my $ssh = Net::SSH::Perl->new( $host, protocol => "2,1" ); $ssh->login($user); $ssh->register_handler( "stdout", sub { my ( $channel, $buffer ) = @_; my $log = $buffer->bytes; print $log; unless ($log) { exit; } } ); my ( $stdout, $stderr, $exit ) = $ssh->cmd($cmd); } 1;