Unable to ssh into droplet after zsh install

June 25, 2015 524 views
Linux Basics Linux Commands Configuration Management System Tools Ubuntu

Hey folks,

I installed zsh and now I am unable to ssh into the droplet. Any idea what's going on?
I contacted Support and got the steps below but I got stuck because I can't edit any file in the recovery mode. I tried vim, emacs and nano but neither one of those commands existed.

I'll really appreciate any help on this.


p.s here are the instructions I got from support.
1.) Power off your droplet and change your kernel to the DO-recovery-static-fsck image.

2.) Boot your droplet and access it via the console in the control panel.

3.) Run the command "blkid" and make note of the device with LABEL="DOROOT" (it should be either /dev/vda or /dev/vda1)

4.) Run the command "mkdir /mnt", then "mount $DEV /mnt", replacing $DEV with the device you found in the previous step

5.) Check /mnt/var/log/auth.log to see if it contains information about the issue

6.) If necessary, run the command "sed -i -re 's;^(root.*:)[^:]+$;\1/bin/bash;' /mnt/etc/passwd" (or just edit /mnt/etc/passwd directly to use the correct shell)

7.) Power off your droplet, change the kernel back to the original, and reboot

Are you able to log in successfully at that point?

1 Answer

It is possible that if your users default shell is not set properly it can prevent you from logging in. In addition to the recovery kernel support has the ability to boot your droplet to a recovery ISO which provides a full live Debian environment where you should be able to mount your disk r/w. I'd recommend updating your ticket and requesting that support boot your droplet to the recovery ISO so you can investigate further.

Have another answer? Share your knowledge.