- 论坛徽章:
- 0
|
$connect = new Net::SSH: erl(
"192.168.*.*",
port => "22",
protocol => '2,1',
options => [
'BatchMode yes',
'RSAAuthentication no',
'PubkeyAuthentication no',
'NumberOfPasswordPrompts 1',
'ChallengeResponseAuthentication no',
'PasswordAuthentication yes',
'UserKnownHostsFile /dev/null',
],
);
$connect->login("****", "****" ;
($value, $err_msg, $exit_code) = $connect->cmd("cat \$ORACLE_HOME/network/admin/sqlnet.ora | grep -i AUTHENTICATION_SERVICES" ;
代码如上,但是总是报错:cat: /network/admin/sqlnet.ora: No such file or directory
但是如果不使用ssh,而是直接在设备上跑qx{cat \$ORACLE_HOME/network/admin/sqlnet.ora | grep -i AUTHENTICATION_SERVICES},则没有问题
有人知道这是为什么吗?
难道ssh不支持参数传递?
|
|