I'm trying to connect my CentOS server with my router Juniper using php. I'm using a library called netconf-php. My code is:
<?php
include ('netconf/Device.php') ;
//creating a new device and establishing NETCONF session
$d= new Device("x.y.z.m", "user", "passw");
$d->connect();
echo 'connected to device';
//closing device
$d->close();
echo "device closed";
?>
But in the connect function it stop. I have search in the function connect in the device.php and the problem is with the function $this->stream = expect_popen("ssh -o ConnectTimeout=$this->connectTimeout $this->userName@$this->hostName -p $this->port -s netconf");
. The console doesn't return anything.
I have installed all the libraries that appear in the documentation.
Anybody knows what could be the problem??
Thanks in advance