Broken SSH to recover [closed]

Posted on

Broken SSH to recover [closed] – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, ssh, , , .

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

Solution :

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.

Leave a Reply

Your email address will not be published.