PHP: ssh2_auth_password - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ssh2_auth_pubkey_file ssh2_auth_none

Last updated: Sat, 27 Jan 2007

view this page in

# ssh2_auth_password

(PECL)

ssh2_auth_password -- Authenticate over SSH using a plain password

## Description

bool ssh2_auth_password ( resource session, string username, string password )

Authenticate over SSH using a plain password

Пример 1. Authenticating with a password

`<?php
$connection = ssh2_connect('shell.example.com', 22);
if (ssh2_auth_password($connection, 'username', 'secret')) {
echo "Authentication Successful!\n";
} else {
die('Authentication Failed...');
}
?>`

add a note User Contributed Notes
ssh2_auth_password
noels01 at gmx dot net
29-Aug-2005 05:56
`Do not try to authenticate or log in more than once on a ssh2 connection. It won't work. You'll need a new connection via ssh2_connect() which will result in a poor performance if you're doing several connects to the same server.`
05-Jun-2005 07:49
`The sshd you are trying to connect to requires PasswordAuthentication yes in its sshd_config file.
Most normal SSH features work with this off, but this requires it on. Note, this defaults to off in FreeBSD 5.x`
add a note
ssh2_auth_pubkey_file ssh2_auth_none

Last updated: Sat, 27 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 10:36:09 2007 PST