LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to setup sshd log to convert ip address to FQDN during connection (http://www.linuxquestions.org/questions/linux-newbie-8/how-to-setup-sshd-log-to-convert-ip-address-to-fqdn-during-connection-4175437913/)

driftwood 11-20-2012 01:31 AM

how to setup sshd log to convert ip address to FQDN during connection
 
hi everyone, i have question for suse linux OS where inside my sshd.log it capture the connection log from which IP address during connection.But i want to capture the FQDN as well and include it inside my sshd.log. I have search on google and can't find the solution. the scenario is like shown below

i need help on how to add my FQDN in log messages

Before
Nov 20 15:27:15 zeus sshd[6810]: Accepted keyboard-interactive/pam for root from 192.168.2.1 port 60900 ssh2

After
Nov 20 15:27:15 zeus sshd[6810]: Accepted keyboard-interactive/pam for root from 192.168.2.1 My-PC port 60900 ssh2


Thanks

acid_kewpie 11-20-2012 03:06 AM

i'd really suggest that you don't do this. The "tip" is usually to turn it off as reverse lookups are one of the biggest reasons for SSH hanging. setting the UseDNS option in sshd_config will sort this, but no one willingly sets it to "yes"

driftwood 11-20-2012 03:22 AM

Hi Chris,

thanks for the info. i didn't know how to explain this but the customer is willing to sacrifice the ssh hanging in order for them to get the FQDN in the logs. Is there any document or step on how to accomplish this?

Thank you

acid_kewpie 11-20-2012 03:36 AM

as above, just set useDNS. There are literally thousands of google hits on how to do this if you look.

driftwood 11-20-2012 04:03 AM

Hi Chris,

i have commented it out but no luck when i test it out the logs are still showing the IP address instead of the FQDN.

Thank you

acid_kewpie 11-20-2012 04:13 AM

well don't comment it out, set it explicitly, and confirm that the reverse lookup actually DOES work outside of ssh.


All times are GMT -5. The time now is 10:15 AM.