Linux PAM - get the destination host client is trying to connect

32 Views Asked by At

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.

0

There are 0 best solutions below