<?php
$host = '108.61.85.3';
$port = 22;
$username = 'newadmin';
$password = 'devbrewing21';
echo "Testing SSH connection to $host:$port...\n";
$connection = @ssh2_connect($host, $port);
if (!$connection) {
die("❌ Failed to open SSH connection. Check firewall or host reachability.\n");
}
echo "✅ SSH socket opened.\n";
if (!@ssh2_auth_password($connection, $username, $password)) {
die("❌ Authentication failed. Check username/password or allowed auth methods.\n");
}
echo "✅ Authentication succeeded!\n";
$sftp = @ssh2_sftp($connection);
if (!$sftp) {
die("❌ SFTP subsystem could not start. Server may not allow SFTP.\n");
}
echo "✅ SFTP subsystem started successfully.\n";
?>