#!/usr/bin/perl
sub paranthesis {
my @paran = @_;
system( 'scp', '/users/myuser/merc/rem_snew.pl',
"$remoteuser\@$remoteserver:/users/$remoteuser/tmp/rem_snew2.pl" );
my $result
= `ssh $remoteuser\@$remoteserver perl /users/$remoteuser/tmp/rem_snew2.pl`;
print "$result\n";
system( 'ssh', "$remoteuser\@$remoteserver", 'rm',
"/users/$remoteuser/tmp/rem_snew2.pl" );
}
paranthesis(@paran);
####
perl filename.pl remoteuser remoteserver
####
ssh: : Hostname and service name not provided or found
lost connection
usage: ssh [-1246AaCfgkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]
[-D port] [-e escape_char] [-F configfile]
[-i identity_file] [-L [bind_address:]port:host:hostport]
[-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
[-R [bind_address:]port:host:hostport] [-S ctl_path]
[user@]hostname [command]
usage: ssh [-1246AaCfgkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]
[-D port] [-e escape_char] [-F configfile]
[-i identity_file] [-L [bind_address:]port:host:hostport]
[-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
[-R [bind_address:]port:host:hostport] [-S ctl_path]
[user@]hostname [command]