diff options
-rw-r--r-- | include/libssh/server.h | 17 | ||||
-rw-r--r-- | src/server.c | 6 |
2 files changed, 17 insertions, 6 deletions
diff --git a/include/libssh/server.h b/include/libssh/server.h index 6564f7c7..ec09f2f8 100644 --- a/include/libssh/server.h +++ b/include/libssh/server.h @@ -193,6 +193,23 @@ LIBSSH_API int ssh_handle_key_exchange(ssh_session session); */ LIBSSH_API void ssh_bind_free(ssh_bind ssh_bind_o); +/** + * @brief Set the acceptable authentication methods to be sent to the client. + * + * + * @param[in] session The server session + * + * @param[in] auth_methods The authentication methods we will support, which + * can be bitwise-or'd. + * + * Supported methods are: + * + * SSH_AUTH_METHOD_PASSWORD + * SSH_AUTH_METHOD_PUBLICKEY + * SSH_AUTH_METHOD_HOSTBASED + * SSH_AUTH_METHOD_INTERACTIVE + * SSH_AUTH_METHOD_GSSAPI_MIC + */ LIBSSH_API void ssh_set_auth_methods(ssh_session session, int auth_methods); /********************************************************** diff --git a/src/server.c b/src/server.c index 017a4cc5..3c1ee74c 100644 --- a/src/server.c +++ b/src/server.c @@ -557,12 +557,6 @@ static int ssh_server_kex_termination(void *s){ return 1; } -/** Set the acceptable authentication methods to be sent to - * client. - * @param[in] session the SSH server session - * @param[in] auth_methods Bitfield of authentication methods - * to be accepted, e.g. SSH_AUTH_METHOD_PUBLICKEY - */ void ssh_set_auth_methods(ssh_session session, int auth_methods){ /* accept only methods in range */ session->auth_methods = auth_methods & 0x3f; |