2

I've been messing up my ssh as trying to add a new user. Now I can not access server Via ssh I have access to Parallel is there a hope to recover ssh connection?

ssh -v -v -v [email protected]

drops

Authentications that can continue: publickey,password
Permission denied, please try again.

History before disaster

useradd myname
passwd myname

than edited

/etc/ssh/sshd_config

added

AllowUsers myname

restarted

service ssh restart

after all of this exit and trying to log in but even root is not working now

Making a bit of research after recovery how to add a new ssh users I found it that doesn't needs any editing /etc/ssh/sshd_config just simply add a new user adduser youusername and reload ssh service ssh reload

4
  • It depends on whatever you did to mess it up. Did you make a backup before you made any changes? Do you keep a log of what you did?
    – Zoredache
    Dec 11, 2013 at 19:49
  • logs I can access backup this time I did not made
    – fefe
    Dec 11, 2013 at 19:49
  • I don't mean can you get to the system logs, I mean do you have notes about exactly what you were doing? Like a console history? You could have done dozens of things to break your system. If you can't tell us what you did, then telling you how to fix it will have to be random guesses...
    – Zoredache
    Dec 11, 2013 at 19:52
  • okay I will try to document
    – fefe
    Dec 11, 2013 at 19:53

1 Answer 1

4

You set AllowUsers myname in your configuration. This means that only myname can log in to the server with ssh. Not even root can log in since it is not named in AllowUsers.

To resolve the issue, login and fix or remove the AllowUsers directive.

1
  • I got it to work resetting all changes in /etc/ssh/sshd_config via Parallel. Anyway would be good to know how to add properly a new ssh user
    – fefe
    Dec 11, 2013 at 20:02

Not the answer you're looking for? Browse other questions tagged .