Вот способ подключения с использованием языка PHP:
<?php
$connection = ssh2_connect('shell.example.com', 22);
ssh2_auth_password($connection, 'username', 'password');
$stream = ssh2_exec($connection, '/usr/local/bin/php -i');
?>
// $connection is the SSH connection link identifier, obtained from a call to ssh2_connect().