From e3eacef1350208bd242a304d54b56e448cd84ff8 Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Tue, 15 Feb 2005 00:04:09 +0000 Subject: [PATCH] New function git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@179800 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../functions/ssh2-auth-hostbased-file.xml | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 reference/ssh2/functions/ssh2-auth-hostbased-file.xml diff --git a/reference/ssh2/functions/ssh2-auth-hostbased-file.xml b/reference/ssh2/functions/ssh2-auth-hostbased-file.xml new file mode 100644 index 0000000000..8e136abb12 --- /dev/null +++ b/reference/ssh2/functions/ssh2-auth-hostbased-file.xml @@ -0,0 +1,78 @@ + + + + + ssh2_auth_hostbased_file + + Authenticate using a public hostkey + + + + Description + + boolssh2_auth_hostbased_file + resourcesession + stringusername + stringhostname + stringpubkeyfile + stringprivkeyfile + stringpassphrase + stringlocal_username + + + + Authenticate using a public hostkey read from a file. If privkeyfile + is encrypted (which it should be), the passphrase must be provided. + If local_username is omitted, then the value for + username will be used for it. + + + + Authentication using a public hostkey + +'ssh-rsa')); + +if (ssh2_auth_hostbased_file($connection, 'remoteusername', 'myhost.example.com', + '/usr/local/etc/hostkey_rsa.pub', + '/usr/local/etc/hostkey_rsa', 'secret', + 'localusername')) { + echo "Public Key Hostbased Authentication Successful\n"; +} else { + die('Public Key Hostbased Authentication Failed'); +} +?> +]]> + + + + + + ssh2_auth_hostbased_file requires libssh2 >= 0.7 and PHP/SSH2 >= 0.7 + + + + + + +