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 root@mydomm.com

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

closed as off-topic by Wesley, ceejayoz, Zoredache, mdpc, Ward Dec 11 '13 at 21:51

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is dedicated to professional system and network administrators. End user and enthusiast questions are off-topic (contact your system administrator or hire a professional to help you out). Please see the Help Center for more information." – Wesley, ceejayoz, Zoredache, mdpc, Ward
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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 '13 at 19:49
  • logs I can access backup this time I did not made – fefe Dec 11 '13 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 '13 at 19:52
  • okay I will try to document – fefe Dec 11 '13 at 19:53
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.

  • 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 '13 at 20:02

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