Can not login via ssh after creating a droplet from snapshot

November 14, 2019 173 views
CentOS Linux Basics

Hi all
I have created a snapshot from an existing live droplet
After creating I can not login via ssh. When I type cat /etc/shadow I see taht many accounts have been blocked. redis:!!…
So I can login from digitalocean console but can not login centos web panel or plain ssh

1 Answer

Hi @trmstf816d0e713d0e94e66cad,

Root shouldn’t be blocked, so I’ll recommend sshing from that. Afterwards, you can enable shell for the needed accounts. As for redis, I can confirm it doesn’t need a login.

To connect with root, you can add your SSH Key to the droplet and then SSH .

As for another users, you’ll need to edit your sshd_config for that.

$ sudo vi /etc/ssh/sshd_config

Add or edit the following line

AllowUsers users

Replace “users” with your username. You can also specify more than one user as shown below.

AllowUsers sk newUserName

Once, you’ve allowed/enabled SSH for the needed user, save the file and restart sshd

sudo systemctl restart sshd

Regards,
KDSys

Have another answer? Share your knowledge.