note 117558 added to function.ssh2-auth-password
| From: | sgchris at gmail dot com | Date: | Mon, 29 Jun 2015 11:00:56 +0000 |
| Subject: | note 117558 added to function.ssh2-auth-password | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-202988@lists.php.net to get a copy of this message | ||
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');
}
?>
----
Server IP: 72.52.91.14
Probable Submitter: 212.199.177.67
----
Manual Page -- http://php.net/manual/en/function.ssh2-auth-password.php
Edit -- https://master.php.net/note/edit/117558
Del: integrated -- https://master.php.net/note/delete/117558/integrated
Del: useless -- https://master.php.net/note/delete/117558/useless
Del: bad code -- https://master.php.net/note/delete/117558/bad+code
Del: spam -- https://master.php.net/note/delete/117558/spam
Del: non-english -- https://master.php.net/note/delete/117558/non-english
Del: in docs -- https://master.php.net/note/delete/117558/in+docs
Del: other reasons-- https://master.php.net/note/delete/117558
Reject -- https://master.php.net/note/reject/117558
Search -- https://master.php.net/manage/user-notes.php