http://www.perlmonks.org?node_id=1024341


in reply to SSH to remote subsystem (Net::OpenSSH?)

yes, for instance:
my $ssh = Net::OpenSSH->new($host, user=>$user, password=>$pass); $ssh->error and die "unable to connect to remote host: " . $ssh->error +; my ($socket, $pid) = $ssh->open2socket({ssh_opts => '-s'}, 'xmlagent') +; talk_to_subsystem($socket); waitpid($pid, 0);

Depending on the way the subsystem works there may be better ways to interact with it.