Can't login through ssh anymore

Hello there,

so it seems i messed up the ssh settings.

Cleavr App does not respond to anything i’m trying to do on the server.

Things i did:
play around in the sshd_config file. adding a user group and also globally turning PasswordAuthentication → yes and ChallengeResponseAuthentication → yes

Now i can’t seem to log in through ssh anymore:
ssh cleavr@X
ssh: connect to host X port 22: Connection refused

Any idea how to get back in?

Any help is very much appreciated!

Did you by chance change the SSH port number from 22 to something else? If so, you can update the port number in Cleavr > server > services > configure SSH service and change port number.

The SSH on a different port, would be something like:

ssh cleavr@{public ip} -p {port number}

Sadly not. It’s still 22 :confused:

even trying to access with root@ does not work:
ssh root@x
ssh: connect to host x port 22: Connection refused

Does it give you a prompt to enter a password or it just shows the refusal response right away?

right away! I think because PasswordAuthentication is disabled by default by cleavr.

I managed to login with user cleavr through hetzner cloud. phew. close enough.

My sshd looks like the following. any advice what to change?




image

I was trying to “simply” add an sftp user group and corresponding user…

I could just copy over from another server, to reset to default, right?

Yes, I believe you should be able to copy over. The main things we do to the default is disable password auth in favor of SSH keys.

If you’re looking to harden SSH access a bit, I’d recommend changing the port number from 22 to something else; which you can do from Cleavr as mentioned above.

1 Like

Thank you for your fast reply and help! Copying over from another server helped!

Lucky me!

1 Like