Voting

: two minus one?
(Example: nine)

The Note You're Voting On

sgchris at gmail dot com
9 years ago
Please note that the function ssh2_auth_password raises PHP warning(!) on bad authentication. To avoid the warning, use the "silence" ("@") operator.

<?php
$ssh
= ssh2_connect($host);
if (
false === $ssh) {
die(
'connection failed');
}

$auth = @ssh2_auth_password($ssh, $user, $password);
if (
false === $auth) {
die(
'authentication failed');
}
?>

<< Back to user notes page

To Top