How do I regain access to root after accidental chsh command that went bad?
Solution 1:
@All,
This was a silly mistake, but I have solved it. When booting up with the recovery image for the VPS, I had to mount my /dev/xvda to /media/xvda however when running commands such as sudo nano /etc/passwd they were running relative to the RECOVERY IMAGE and not my mounted location.
Simply running sudo nano etc/passwd sorted this whle mess out because now I was editing /meda/xvda/etc/passwd instead of [RECOVERY IAMGE]/etc/passwd
I change the shell back to /bin/bash for root and SSH access was restored.
I hope someone can take something away with them from this silly mistake of mine.