Code: Select all
function routeros_Connect($host, $username, $password) {
if (!function_exists("ssh2_connect")) die("function ssh2_connect doesn't exist");
$methods = array ( 'kex' => 'diffie-hellman-group1-sha1' );
$shell = ssh2_connect($host, 22, $methods);
ssh2_auth_password($shell, $username, $password);
return $shell;
}
Any advice?