Functions | |
| int | ssh_userauth_autopubkey (SSH_SESSION *session) |
| Tries to automaticaly authenticate with public key and "none". | |
| int | ssh_userauth_kbdint (SSH_SESSION *session, char *user, char *submethods) |
| Try to authenticate through the "keyboard-interactive" method. | |
| char * | ssh_userauth_kbdint_getinstruction (SSH_SESSION *session) |
| get the "instruction" of the message block | |
| char * | ssh_userauth_kbdint_getname (SSH_SESSION *session) |
| get the "name" of the message block | |
| int | ssh_userauth_kbdint_getnprompts (SSH_SESSION *session) |
| get the number of prompts (questions) the server has given | |
| char * | ssh_userauth_kbdint_getprompt (SSH_SESSION *session, int i, char *echo) |
| get a prompt from a message block | |
| void | ssh_userauth_kbdint_setanswer (SSH_SESSION *session, unsigned int i, char *answer) |
| set the answer for a question from a message block. | |
| int | ssh_userauth_none (SSH_SESSION *session, char *username) |
| Try to authenticate through the "none" method. | |
| int | ssh_userauth_offer_pubkey (SSH_SESSION *session, char *username, int type, STRING *publickey) |
| Try to authenticate through public key. | |
| int | ssh_userauth_password (SSH_SESSION *session, char *username, char *password) |
| Try to authenticate by password. | |
| int | ssh_userauth_pubkey (SSH_SESSION *session, char *username, STRING *publickey, PRIVATE_KEY *privatekey) |
| Try to authenticate through public key. | |
| int ssh_userauth_autopubkey | ( | SSH_SESSION * | session | ) |
Tries to automaticaly authenticate with public key and "none".
it may fail, for instance it doesn't ask for a password and uses a default asker for passphrases (in case the private key is encrypted)
| session | ssh session |
| int ssh_userauth_kbdint | ( | SSH_SESSION * | session, | |
| char * | user, | |||
| char * | submethods | |||
| ) |
Try to authenticate through the "keyboard-interactive" method.
| session | ssh session | |
| user | username to authenticate. You can specify NULL if ssh_option_set_username() has been used. You cannot try two different logins in a row. | |
| submethods | undocumented. Set it to NULL |
| char* ssh_userauth_kbdint_getinstruction | ( | SSH_SESSION * | session | ) |
get the "instruction" of the message block
You have called ssh_userauth_kbdint() and got SSH_AUTH_INFO. this function returns the questions from the server
| session | ssh session |
| char* ssh_userauth_kbdint_getname | ( | SSH_SESSION * | session | ) |
get the "name" of the message block
You have called ssh_userauth_kbdint() and got SSH_AUTH_INFO. this function returns the questions from the server
| session | ssh session |
| int ssh_userauth_kbdint_getnprompts | ( | SSH_SESSION * | session | ) |
get the number of prompts (questions) the server has given
You have called ssh_userauth_kbdint() and got SSH_AUTH_INFO. this function returns the questions from the server
| session | ssh session |
| char* ssh_userauth_kbdint_getprompt | ( | SSH_SESSION * | session, | |
| int | i, | |||
| char * | echo | |||
| ) |
get a prompt from a message block
You have called ssh_userauth_kbdint() and got SSH_AUTH_INFO. this function returns the questions from the server
| session | ssh session | |
| i | index number of the ith prompt | |
| echo | when different of NULL, it will obtain a boolean meaning that the resulting user input should be echoed or not (like passwords) |
| void ssh_userauth_kbdint_setanswer | ( | SSH_SESSION * | session, | |
| unsigned int | i, | |||
| char * | answer | |||
| ) |
set the answer for a question from a message block.
You have called ssh_userauth_kbdint() and got SSH_AUTH_INFO. this function returns the questions from the server
| session | ssh session | |
| i | index number of the ith prompt | |
| answer | answer to give to server |
| int ssh_userauth_none | ( | SSH_SESSION * | session, | |
| char * | username | |||
| ) |
Try to authenticate through the "none" method.
| session | ssh session | |
| username | username to authenticate. You can specify NULL if ssh_option_set_username() has been used. You cannot try two different logins in a row. |
| int ssh_userauth_offer_pubkey | ( | SSH_SESSION * | session, | |
| char * | username, | |||
| int | type, | |||
| STRING * | publickey | |||
| ) |
Try to authenticate through public key.
| session | ssh session | |
| username | username to authenticate. You can specify NULL if ssh_option_set_username() has been used. You cannot try two different logins in a row. | |
| type | type of public key. This value is given by publickey_from_file() | |
| publickey | a public key returned by publickey_from_file() |
privatekey_from_file()
| int ssh_userauth_password | ( | SSH_SESSION * | session, | |
| char * | username, | |||
| char * | password | |||
| ) |
Try to authenticate by password.
| session | ssh session | |
| username | username to authenticate. You can specify NULL if ssh_option_set_username() has been used. You cannot try two different logins in a row. | |
| password | password to use. Take care to clean it after authentication |
| int ssh_userauth_pubkey | ( | SSH_SESSION * | session, | |
| char * | username, | |||
| STRING * | publickey, | |||
| PRIVATE_KEY * | privatekey | |||
| ) |
Try to authenticate through public key.
| session | ssh session | |
| username | username to authenticate. You can specify NULL if ssh_option_set_username() has been used. You cannot try two different logins in a row. | |
| publickey | a public key returned by publickey_from_file() | |
| privatekey | a private key returned by privatekey_from_file() |
privatekey_from_file()
private_key_free()
1.5.2-20070719