Provider changed there security settings and now I am not able to connect. I get this error "ssh2_connect(): Error starting up SSH connection(-5): Unable to exchange encryption keys "
these are the keys they except now. how to I tell ssh_connect() to use one of these
try {
$connection = ssh2_connect($db['cit_host'], $port);
if(!$connection){
throw new \Exception("Could not connect to $host on port $port");
}
$auth = ssh2_auth_password($connection, $user, $pass);
if(!$auth){
throw new \Exception("Could not authenticate with username $user and password ");
}
$sftp = ssh2_sftp($connection);
if(!$sftp){
throw new \Exception("Could not initialize SFTP subsystem.");
}
$stream = fopen("ssh2.sftp://" .(int)$sftp.'//Inbox//'.$remoteFile, 'w');
if (! $stream) {
echo "<td>$sftp$remoteFile</td>";
throw new \Exception("Could not open file: ");
}
$file = file_get_contents($remoteFile);
if (fwrite($stream, $file) ===FALSE){
echo "File Not Written";