use Net::SSH2;
$HostName=$ARGV[0];
my $ssh2 = Net::SSH2->new();
$ssh2->connect("$HostName") or die "Unable to connect Host $@ \n";
$ssh2->auth_password('user','passwd') or die "Unable to login $@ \n";
my $chan = $ssh2->channel();
$chan->shell();
print $chan "cd C:\Test\n";
上面的代码似乎不适用于 windows 框。谁能告诉我这个问题?