SSH2_PUBLICKEY_INIT(3) 1 SSH2_PUBLICKEY_INIT(3)ssh2_publickey_init - Initialize Publickey subsystemSYNOPSIS
resource ssh2_publickey_init (resource $session)
DESCRIPTION
Request the Publickey subsystem from an already connected SSH2 server.
The publickey subsystem allows an already connected and authenticated client to manage the list of authorized public keys stored on the
target server in an implementation agnostic manner. If the remote server does not support the publickey subsystem, the ssh2_pub-
lickey_init(3) function will return FALSE.
PARAMETERS
o $session
-
RETURN VALUES
Returns an SSH2 Publickey Subsystem resource for use with all other ssh2_publickey_*() methods or FALSE on failure.
NOTES
Note
The public key subsystem is used for managing public keys on a server to which the client is already authenticated. To authenticate
to a remote system using public key authentication, use the ssh2_auth_pubkey_file(3) function instead.
SEE ALSO ssh2_publickey_add(3), ssh2_publickey_remove(3), ssh2_publickey_list(3).
PHP Documentation Group SSH2_PUBLICKEY_INIT(3)
Check Out this Related Man Page
libssh2_userauth_publickey_fromfile(3) libssh2 manual libssh2_userauth_publickey_fromfile(3)NAME
libssh2_userauth_publickey_fromfile - authenticate a session with a public key, read from a file
SYNOPSIS
#include <libssh2.h>
int libssh2_userauth_publickey_fromfile_ex(LIBSSH2_SESSION *session,
const char *username,
const char *publickey,
const char *privatekey,
const char *passphrase);
DESCRIPTION
session - Session instance as returned by libssh2_session_init_ex(3)
username - Pointer to user name to authenticate as.
username_len - Length of username.
publickey - Path name of the public key file. (e.g. /etc/ssh/hostkey.pub). If libssh2 is built against OpenSSL, this option can be set to
NULL.
privatekey - Path name of the private key file. (e.g. /etc/ssh/hostkey)
passphrase - Passphrase to use when decoding privatekey.
Attempt public key authentication using a PEM encoded private key file stored on disk
RETURN VALUE
Return 0 on success or negative on failure. It returns LIBSSH2_ERROR_EAGAIN when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is a
negative number, it isn't really a failure per se.
ERRORS
LIBSSH2_ERROR_ALLOC - An internal memory allocation call failed.
LIBSSH2_ERROR_SOCKET_SEND - Unable to send data on socket.
LIBSSH2_ERROR_SOCKET_TIMEOUT -
LIBSSH2_ERROR_PUBLICKEY_UNVERIFIED - The username/public key combination was invalid.
LIBSSH2_ERROR_AUTHENTICATION_FAILED - Authentication using the supplied public key was not accepted.
SEE ALSO libssh2_session_init_ex(3)libssh2 0.15 1 Jun 2007 libssh2_userauth_publickey_fromfile(3)
Hi,
I need to implement sftp between server 1 and server2.
I have already generated the public key using account user1 on server 1 and and sent it to the administrator of server2.
I have also finished updating the identification file at /home/user1/.ssh2
I have an account created... (2 Replies)
Hello !
I've got a question . I really don't het this point. Let's supose that I have a client connected to a server.
I want the server IMEDIATLY know if the client is diconnected . How can I realize this ? :mad:
Amd I'm just curios about one thing. I have a server and multiple clients... (3 Replies)
aix 4.3
I get the following error from the errpt log
BD797922 0306170008 P H enclosure0 SUBSYSTEM FAILURE
I'm not clear on this kind of error. It never happened to me.
What do this errors mean, and how do I clear or solve them?
Any help is appreciated. (2 Replies)
Hello All,
Does some one have any idea about the subsystem component failure. Errpt command throws below errors for my server :-
# errpt
IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION
B9735AF4 0304222408 P H hdisk5 SUBSYSTEM COMPONENT FAILURE
B9735AF4 0304222408 P H... (1 Reply)
I am getting the error message
"Permission denied (publickey).
lost connection"
when I attempt to do an scp migration. I know how to generate the public keys in both IIS and UNIX, and I believe they are both suppose to have the same public key - but where are they each suppose to be stored (I... (1 Reply)
Hi,
I am running a script to scp a file from one server to another.
I have created the public/private key and copied the public key to the other server and appended it to authorized_key file.
But i am getting the error message saying "Host Key verification failed" Connection lost.
It works well... (3 Replies)
Hello All,
We are recently migrated to a new server and we have transferred the public keys from old server to new server and communicated to all the systems to publish their files onto new serve. But stilll we are receiving a file onto our old server on daily basis at a particular time but... (5 Replies)
Hey all, I have a request from a third party that will be setting my firm up for an account so we can sftp files to their server in a Production environment. I know where the public keys are located on our Red Hat Linux envronment. I was going to ftp the keys from the Linux environment over to my... (2 Replies)
Hello,
I'm trying to setup password less authentication to remote ssh server. I generated the public key and gave it to the vendor and The key is added in the remote machines authorized_keys file.
When I try to connect to a remote machine through SFTP username@host I am getting the error... (4 Replies)
Hi All,
I have a query....say on server A, I have generated the Private and Public keys and shared the public key with server B.
Now i can surelyconnect(without password) from server A to server B.....
but can i similarly connect from server B to server A as well
Regards (1 Reply)
hi,
good morning.
Anyone can help me out. A trying to ftp from server A to server B.
from server A to B its working fine but from server B to A, its only showing connected only:
finap7 #ftp 10.10.10.210
Connected to 10.10.10.210.
I refresh the inetd but nothing is happening.
Please... (1 Reply)
I am testing the following command to transfer a file from my server (AIX 5.2) to another server. I was able to generate the keys and sent them the public key.
scp -v -P 4030 /home/lawson/.ssh/jimtest.txt someuser@some.ftpsite.net:/Inbound/jimtest.txt > jimtest_out.txt 2>&1
Based on... (3 Replies)
Hi,
I have public and private keys and that's works fine for me. now I am sending files one by one on remote server and I want to check is file successfully delivered or not by comparing size of file on local machine and remote server using ‘stat -c%s'.
Below operations need to be done on... (2 Replies)