Yesterday i was connected to my droplet via SSH as usual, doing my work. Then i has issues with zsh so i removed it to use the default console:
sudo apt-get --purge remove zsh
Then I exited and now I can’t connect anymore.
Via SSH I get the “permission denied” error. Via web console it looks like the login worked (I see the welcome screen for a second), and then it goes back to the login screen again.
Right now i have no way to log in. I tried re-adding the SSH key via dashboard and it says that the SSH key is already installed, so that’s not the problem (but i knew it).
I believe that after removing zsh now i don’t have a default shell.
What could I do??
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hey @stesvis just so I understand more, you deleted zsh from your machine (client)
If you readd a key via the dashboard, it does not add it to the server. You can make a snapshot, then start a new server from that snapshot and select your key. Or you can use recovery boot to add your SSH key to the file system. I can go into more details if you wish.
However, I don’t think you would have deleted your local key? Whats inside your client machines ~/.ssh folder?
If you ssh with -vvv you will see more details with what its attempting to do with authentication.
Regards
@snapshooter yes please advise on how to recover.
In my client .ssh folder i have the id_rsa public and private keys. If I go to My Account, Security and click on Add SSH Key i can paste my public key from the local machine but then it says that the key is already registered on the authorized_keys file on the server.
And i am not surprised because i was connected 2 minutes before via SSH.
I had zsh installed on the server, but it had issues so i wanted to remove it and go back to the default bash.
I removed zsh from the server without setting the default bash first, and i believe this is the beginning of all my issues right now.
@snapshooter I ran ssh with the -vvv parameter and posted the response, but it was marked as spam.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.