Can' t log in via SSH to my server anymore  [SOLVED]

Discussions about the usage of KeyHelp.
Post Reply
User avatar
gusarg81
Posts: 48
Joined: Sun 18. Jul 2021, 02:20
Location: Argentina
Contact:

Can' t log in via SSH to my server anymore

Post by gusarg81 »

Hi,

I don´t know whats happened, But I can't login to my server anymore, it rejects my password (which was weird when It asked today, since I have stored my SSH keys in it.

Is there a way to access from KeyHelp to sshd settings?

OS: Ubuntu 24.04
KeyHelp version: Latest (upgraded one month ago from 22.04 to 24.04 using Keyhelp script).

Thanks in advance.
User avatar
technotravel
KeyHelp Translator
Posts: 354
Joined: Mon 19. Oct 2020, 11:11

Re: Can' t log in via SSH to my server anymore

Post by technotravel »

gusarg81 wrote: Wed 27. Nov 2024, 21:32 Hi,

I don´t know whats happened, But I can't login to my server anymore, it rejects my password (which was weird when It asked today, since I have stored my SSH keys in it.

Is there a way to access from KeyHelp to sshd settings?

OS: Ubuntu 24.04
KeyHelp version: Latest (upgraded one month ago from 22.04 to 24.04 using Keyhelp script).

Thanks in advance.
I don't know who is hosting your server (unless of course it's a bare metal in your flat ...) - but my provider offers an option to set a root password, in the web-interface of my account. Server must be shut down for this operation.

Maybe something like this is available ...

Edit: re-reading your post, I'm not sure to understand whether this is just about the Web-Interface of Keyhelp? If you can still access your server on the console via SSH, you could call "keyhelp login" to obtain an URL for immediate login
Chers francophones, je traduis KeyHelp en français. S'il y a des erreurs ou des propositions d'amélioration, n'hésitez pas à me contacter !
(Ich übersetze KeyHelp ins Französische)
User avatar
gusarg81
Posts: 48
Joined: Sun 18. Jul 2021, 02:20
Location: Argentina
Contact:

Re: Can' t log in via SSH to my server anymore

Post by gusarg81 »

I can´t login to SSH. Is my own server, I don't know why is rejecting my SSH keys (and password).
And is my own server hosted in a Datacenter.

Last resort: I will have to go personally to the Datacenter to check what is going on but I wanted to know if there was a way via KeyHelp Web panel or something... (I can login KeyHelp panel just fine...).

Thanks.
User avatar
24unix
Posts: 1910
Joined: Sun 21. Jun 2020, 17:16
Location: Kollmar
Contact:

Re: Can' t log in via SSH to my server anymore

Post by 24unix »

Are you trying to login as root?

Do you have any other ssh-enabled user?
(If not, you could add one via the panel)

If yes, can he login?
If yes: can he su - (and then root password)
Or can he sudo -i

edit:
it rejects my password (which was weird when It asked today, since I have stored my SSH keys in it.
It should not even ask for a password if you use public key auth.
mfg Micha
--
95% aller Programmier halten sich für genial.
Der Rest immer noch für überdurchschnittlich.
User avatar
gusarg81
Posts: 48
Joined: Sun 18. Jul 2021, 02:20
Location: Argentina
Contact:

Re: Can' t log in via SSH to my server anymore

Post by gusarg81 »

Hi,

There is only one allowed SSH user (as per configured in the ssh server with the AllowUsers), which is the one generated originally with the Ubuntu install. This the mayor problem now that I recall.

But I don´t remember If I've changed this behavior. How Can i create one with KeyHelp? I don't see that option, but is AllowUsers still active, I believe won't matter.

And yes, is way weird that is asking me for my password... That is what I am worried about.
User avatar
Alexander
Keyweb AG
Posts: 4177
Joined: Wed 20. Jan 2016, 02:23

Re: Can' t log in via SSH to my server anymore

Post by Alexander »

You can enable "KeyHelp Admin Area -> Configuration -> Support Access" and send me the server IP + SSH port. I could than try to restore your regular login tomorrow (if I am able to log in this way).
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
User avatar
24unix
Posts: 1910
Joined: Sun 21. Jun 2020, 17:16
Location: Kollmar
Contact:

Re: Can' t log in via SSH to my server anymore

Post by 24unix »

gusarg81 wrote: Wed 27. Nov 2024, 23:44 How Can i create one with KeyHelp?
SCR-20241127-unen.png
Add the checkmark to SSH.

But, Alex already offerred help, there is nobody who knows KeyHelp better than him.
mfg Micha
--
95% aller Programmier halten sich für genial.
Der Rest immer noch für überdurchschnittlich.
User avatar
gusarg81
Posts: 48
Joined: Sun 18. Jul 2021, 02:20
Location: Argentina
Contact:

Re: Can' t log in via SSH to my server anymore

Post by gusarg81 »

Alexander wrote: Wed 27. Nov 2024, 23:45 You can enable "KeyHelp Admin Area -> Configuration -> Support Access" and send me the server IP + SSH port. I could than try to restore your regular login tomorrow (if I am able to log in this way).
Hi,

The IP/Host is server.gdnet.ar (or just gdnet.ar or 200.80.30.242). Port is default 22.

At the same time I am asking to the Datacenter to go tomorrow if this way is not possible.
User avatar
gusarg81
Posts: 48
Joined: Sun 18. Jul 2021, 02:20
Location: Argentina
Contact:

Re: Can' t log in via SSH to my server anymore

Post by gusarg81 »

24unix wrote: Wed 27. Nov 2024, 23:50
gusarg81 wrote: Wed 27. Nov 2024, 23:44 How Can i create one with KeyHelp?

SCR-20241127-unen.png
Add the checkmark to SSH.

But, Alex already offerred help, there is nobody who knows KeyHelp better than him.
Oks, thanks. The problem is that user will not have sudo permissions for sure in case I need to fix SSH access. Or I am wrong?
User avatar
gusarg81
Posts: 48
Joined: Sun 18. Jul 2021, 02:20
Location: Argentina
Contact:

Re: Can' t log in via SSH to my server anymore  [SOLVED]

Post by gusarg81 »

Oks guys, I've fixed the problem.

I have access with my user created with KeyHelp panel (by adding SSH permission) and then later inside the server, su - myuser.
To the problem seems that accidentally changed AllowUsers to an user from the Keyhelp panel (where is my mind these days!), which was the one I was available to login.

Sorry for the trouble and thanks for all the replied. Much appreciated as always.
Last edited by gusarg81 on Thu 28. Nov 2024, 00:21, edited 2 times in total.
User avatar
technotravel
KeyHelp Translator
Posts: 354
Joined: Mon 19. Oct 2020, 11:11

Re: Can' t log in via SSH to my server anymore

Post by technotravel »

Probably a silly idea - but have you considered the possibility that fail2ban has locked you out?
Chers francophones, je traduis KeyHelp en français. S'il y a des erreurs ou des propositions d'amélioration, n'hésitez pas à me contacter !
(Ich übersetze KeyHelp ins Französische)
User avatar
gusarg81
Posts: 48
Joined: Sun 18. Jul 2021, 02:20
Location: Argentina
Contact:

Re: Can' t log in via SSH to my server anymore

Post by gusarg81 »

technotravel wrote: Thu 28. Nov 2024, 00:12 Probably a silly idea - but have you considered the possibility that fail2ban has locked you out?
Nope, was the first thing I checked out. But now is fixed. Thanks.
Post Reply