ConfD User Community

Forcing to Close All SSH Session after SSH Credential Changes

Hello Folks,

I change the SSH credential over the netconf by using tailf-aaa actions. But old sessions are still alive.
It means the user who logged in via an old password can still use confd until session timeout. How can i force to close all active session after changing SSH credential.

Many Thanks,
With My Best Regards,

See maapi_kill_user_session() , maapi_end_user_session() and maapi_get_user_sessions()
Best regards

Hello @cohult

Basically, you’re saying that "get all user session-id with this command “maapi_get_user_sessions()” then, kill all users’ sessions one by one.
pseudo-code like this:

for (userSessionID : maapi_get_user_sessions())

I guess there is no way to kill all sessions at one time or
no way to kill all sessions by calling built-in confd RPC actions, right?

Btw, in here session means that SSH session ? I want to just close all SSH sessions.

Many Thanks,
With My Best Regards,

You can use maapi_get_user_session() to get the struct confd_user_info from which you can, for example, get the context of the session.