We have a PAM module deployed that is used by sshd. We got a new requirement to allow certain clients connecting to a specific IP of the linux host. In PAM, we have a way to get the client host as mentioned here https://linux.die.net/man/3/pam_get_item using the PAM_RHOST item.
I want to know if there is a way to get the sshd server's local IP address in the pam module. I could not find any.