Lost SSH access due to stupidity :-(

Hi,

I made  a stupid mistake and I look for the easiest way out :slight_smile: I generally know my way around in Linux generally, and embedded deviced in particular, but I would still like to get an advice.

My WDLive had SSH enabled. I wanted to enable SSH on a non-root user, so I opened /etc/ssh/sshd_config
 and modified the AllowUsers line (IIRC). Instead of properly reading the man page for sshd_config, I stupidly modified it to:

AllowUsers root,newuser

instead of:

AllowUsers root newuser

I also made the rookie mistake of logging out instead of trying it on a different window.

Now I have an sshd that won’t accept ssh from root or any user.

I tried:

Accessing the root partition somehow from the web UI - FAILED

Accessing the root partition somehow through FTP - FAILED

creating a new user named “root,newuser” - failed - the GUI only allows alphanumeric usernames.

Still to try:

Another option I thought was to somehow get a firmware image and hack it to reset the sshd_config file…

The last resort would ofcourse be opening the box and mounting the drive on another machine.

 Any other ideas?

thanks,

Udi

Here you go

http://community.wd.com/t5/My-Book-Live/GUIDE-SSH-Lockout-Fix-for-people-messing-with-sshd-config/m-p/546119#M19315

3 Likes

You are great!!!

3 minutes of work and I can SSH again!

Thank you SO MUCH!

LOL, no problemo :slight_smile: