- 论坛徽章:
- 0
|
本帖最后由 zhlong8 于 2013-08-07 08:29 编辑
在学习使用Net::OpenSSH 模块
对照cpan的例子写了如下脚本
#!/usr/bin/perl
use Net::OpenSSH;
use IO::Pty;
use strict;
use warnings;
my $ip = "192.168.1.102";
my $ssh_password = "1234567";
my $ssh_user = "root";
my $ssh_port = "22";
my $ssh= Net::OpenSSH->new($ip,user=>$ssh_user,passwd=>$ssh_password,port=>$ssh_port);
$ssh->error and die "Couldn't establish SSH connection: ". $ssh->error;
Net::OpenSSH与IO::Pty 均通过cpan成功安装
运行时错误提示
[root@study perl]# ./net_openssh
Unrecognized character \xA3; marked by <-- HERE after se IO::Pty<-- HERE near column 12 at ./net_openssh line 4.
请问这个错误要如何解决。谢谢 |
|