Leser: 1
|< 1 2 >| | 12 Einträge, 2 Seiten |
$ssh->cmd("{ sleep 1; /etc/rc.d/init.d/network restart; } &");
$ssh->cmd("{ sleep 1; /etc/rc.d/init.d/network restart; } 2>/dev/null >/dev/null </dev/null &");
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use Net::SSH::Perl;
cmdossh("172.16.1.89","root", "root");
sub cmdossh {
my($host, $args);
($host, $args{user}, $args{password}, $mode)=@_;
my $ssh = Net::SSH::Perl->new($host);
$ssh->login($args{user},$args{password});
$ssh->cmd("/etc/rc.d/init.d/network restart");
}
$ssh->cmd("/etc/rc.d/init.d/network restart");
my($out, $err, $exit) = $ssh->cmd("/etc/rc.d/init.d/network restart");
|< 1 2 >| | 12 Einträge, 2 Seiten |