ssh2_auth_hostbased_file
PECL ssh2 >= 0.9.0
ssh2_auth_hostbased_file - Authenticate using a public hostkey
Manual
ssh2_auth_hostbased_file(
resource$session,
string$username,
string$hostname,
string$pubkeyfile,
string$privkeyfile,
[string$passphrase],
[string$local_username]
): bool
resource$session,
string$username,
string$hostname,
string$pubkeyfile,
string$privkeyfile,
[string$passphrase],
[string$local_username]
): bool
Authenticate using a public hostkey read from a file.
Parameters
- session
-
An SSH connection link identifier, obtained from a call to ssh2_connect.
- username
-
- hostname
-
- pubkeyfile
-
- privkeyfile
-
- passphrase
-
If privkeyfile is encrypted (which it should be), the passphrase must be provided.
- local_username
-
If local_username is omitted, then the value for username will be used for it.
Return Values
Returns true on success or false on failure.
Notes
Note:
ssh2_auth_hostbased_file requires libssh2 >= 0.7 and PHP/SSH2 >= 0.7