PHP connect to server using ssh2_connect()
===

I went through the examples on PHP website and this website as well, but I am having a hard time figuring out the correct way to connect to a server using PHP ssh2_connect() function. I need to connect to a server and execute commands on it.

Here is the piece of code I have tried, but it does not show anything on the webpage.

		$connection = ssh2_connect($ssh_host, $ssh_port);
		if (!$connection) die('Connection failed');
		
		if (ssh2_auth_password($connection, $username, $password)) {
		  echo "Authentication Successful!\n";
		} else {
		  die('Authentication Failed...');
		}

What am I missing?