my $ssh = Net::OpenSSH->new($host, default_ssh_opts => ['-Y']); my $cmd = 'xterm'; $ssh->system($cmd) or die "Failed to run command: ". $ssh->error;