Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a rather odd problem with my server. For some reason the local hostname for my workstation keeps getting added to the /etc/hosts.deny and when I try to SSH I get:

ssh_exchange_identification: Connection closed by remote host

If I use another workstation and delete my hostname from the file, I have a about a 10 second window to login from my workstation before its added again. My workstation is running Mac OSX Mountain Lion and I'm using ssh from the Terminal. Any idea what could be up or how to find out what's up?

share|improve this question
    
You should be able to fix this by adding your hostname to`/etc/hosts.allow`. Are you running any program to modify the hosts.allow/deny files (like denyhosts) ? –  Manula Waidyanatha Mar 20 '13 at 3:14
    
Is the affected machine running OSX (question body) or Linux (tags)? It's probably denyhosts running amok anyway, but please clarify. –  Gilles Mar 20 '13 at 22:53

1 Answer 1

I agree with Gilles - this sounds very much like there's a tool running on your computer that monitors the ssh log for failed login attempts, like DenyHosts or Fail2ban. SSH itself won't modify the /etc/hosts.deny file.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.