Locked out of my own server by denyhosts


 
Thread Tools Search this Thread
Special Forums Cybersecurity Locked out of my own server by denyhosts
# 1  
Old 12-08-2009
Locked out of my own server by denyhosts

Sigh...

I use denyhosts for security. Been great for months, but today my butterfingers have managed to lock myself out of the server.

The denyhosts FAQ lists ways to edit the files to erase your IP, but...I'm locked out, so how can I edit the files?
# 2  
Old 12-08-2009
dheian,
At the boot prompt use the single-user-mode that is for recovery
Mount the partitions rw and edit the file /etc/hosts.deny
It would work
Otherwise at the grub menu(hope you are using grub)
edit the vmlinuz entry
and change s/ro/rw and append init=/bin/bash
apparently you would get a shell, mount the filesystem containing (aka / on whichever /dev/sd[x]
and edit the file /etc/hosts.deny.
it would work fine.
regards.
# 3  
Old 12-08-2009
Thanks for the fast reply...

Unfortunately, this is a web server and the only way I can access it is via SSH, which of course has locked me out.

Sadly the instructions in the denyhosts FAQ are like saying, "If you've lost your house key, enter your home and find your spare, then unlock the door."
# 4  
Old 12-08-2009
dheian.
all right so you need the master key for that.. hmmm.
what about the file /etc/hosts.allow. I am sure its empty as its a webserver and you want clients from all ends.
so log into through a different host. su to root .and edit the /etc/host.deny
Do reply
Regards.
# 5  
Old 12-08-2009
After pulling my hair out tonight, I realized that I can just head to a coffee shop tomorrow and SSH in from there to do the file edits. Still, the wait's killing me.
# 6  
Old 12-15-2009
Quote:
Originally Posted by dheian
After pulling my hair out tonight, I realized that I can just head to a coffee shop tomorrow and SSH in from there to do the file edits. Still, the wait's killing me.
Excellent. That's the way to do it ......
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Locked out of server due to utmp growing out of control

:(Dear Solaris Experts, The file /var/adm/utmpx is steadily growing on our standbye Sun Sparc T5220 Solaris 10 server. I have tried everything such as the following steps without success: root@rainbow # uname -a SunOS rainbow 5.10 Generic_141444-09 sun4v sparc... (2 Replies)
Discussion started by: gjackson123
2 Replies

2. UNIX for Dummies Questions & Answers

I have files that are locked up...

Here's the story: I had an LaCie Internet Space (1TB)... Recently the network (or software) functions of the device just died... I tried to access it via different routers, checking UTP, tried everything possible to rule out physical damage to components. Then i got the disk out of its... (2 Replies)
Discussion started by: SentinelX
2 Replies

3. UNIX for Dummies Questions & Answers

Denyhosts displaying warning message for users blocked

Hi, I have a dilemma.I am running denyhosts on one of our servers and it monitors illegal ssh/ftp loggins. I am running vsftpd. My manager though has put an additional requirement on me. When someone is blocked my denyhosts he want an error message to be displayed: " YOUR ACCOUNT HAS BEEN... (0 Replies)
Discussion started by: mojoman
0 Replies

4. UNIX for Advanced & Expert Users

Who locked my id?

I am running Solaris 10. Occasionally, my id gets loked. I want to know who/which rougue process locked it. How do I find out? Thanks, KNK (9 Replies)
Discussion started by: nkamatam
9 Replies

5. Solaris

Server Locked

Hi i was changing the entry in the /etc/passwd file for the root user. i was changing the shell from sh to bash . I changed the file and rebooted the server.Now it is saying that invalid shell. I think i have misspelt bash. now the machine is set to boot in maultiuser mode so there is no... (5 Replies)
Discussion started by: asalman.qazi
5 Replies

6. AIX

account is always locked out

we have a user name "Test1" that account is alwyas locked out. The user has been used to many servers to ftp a file from the main server. i already increase the MaxStartups to 99. And still after how many days account will locked. (3 Replies)
Discussion started by: invinzin21
3 Replies

7. HP-UX

locked out!

:confused: I have an K580 HP server. All I did was change the IP address on the NIC and now I can't telnet into it. I can ping, but no telnet. Also, it won't boot if the console monitor is plugged in. ANY IDEAS??? (1 Reply)
Discussion started by: ncmurf00
1 Replies

8. UNIX for Dummies Questions & Answers

Users locked out of Server

hiya all, I have Fedora core 3 installed - as a server - onto an old PC. Root u/n and psw lets me in However, all the other accounts no longer worked. They use to work until yesterday... I now get the error at the login screen: "AUTHENTICATIONFAILED" I hope this is a common... (12 Replies)
Discussion started by: marty 600
12 Replies

9. UNIX for Dummies Questions & Answers

OpenWin Locked up

I have a server that is on solaris 9 and openwin is locked. The mouse won't respond and I can't seem to kill the openwin pid on the server.. Is there a command line to kill openwin from the server side? (2 Replies)
Discussion started by: jphorton
2 Replies

10. UNIX for Dummies Questions & Answers

root locked out

Hello all. I think I have a big problem. the /etc/passwd file got overwritten and now I can't su as root when I telnet into this machine. I am running yp on a different machine and tried to push the passwd file out to all machines, but it didn't help. I noticed that there is a passwd file in... (12 Replies)
Discussion started by: Moca4444
12 Replies
Login or Register to Ask a Question