Try this: $mt = 2.2.2.2; $username = "admin"; $password = "admin"; $methods = array('kex' => 'diffie-hellman-group1-sha1'); $connection = ssh2_connect($mt, 22, $methods); ssh2_auth_password($connection, $username, $password); $shell = ssh2_shell($connection); $cmd="/ip firew...