0

Error : enter image description here

SSH/SFTP : /bin/bash no such a file or directory

I have server hosted on digital ocean, I have upgrade the Linux to version 20.0, everything works fine, even my website is also running fine but I couldn't able to access via SSH.

It was working absolutely fine before upgrade.

Attached the screen to understand more.

  • Can you get a shell via Digital Ocean console? If you are getting the same error, then somehow your `bash` software are missing. You have to boot some sort of rescue and reinstall it. – NStorm Sep 07 '21 at 12:45
  • @NStorm yes, I can get a shell via Digital Ocean. – Vishal Ghantala Sep 07 '21 at 12:53
  • Does it works? Can you run `which bash && echo $SHELL` from it (and post it's output here)? – NStorm Sep 07 '21 at 12:55
  • I run the command and its shows me result /bin/bash for both. – Vishal Ghantala Sep 07 '21 at 13:00
  • Take a look at your sshd_config, can this https://serverfault.com/questions/254233/ssh-fails-bin-bash-no-such-file-or-directory be your case what you have chrooted environment under ssh? – NStorm Sep 07 '21 at 14:10
  • I tried this but when i run command chroot its again throw me the same error. really I hang up , I am not than much familiar with Linux. – Vishal Ghantala Sep 07 '21 at 14:17
  • Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/129360/discussion-between-nstorm-and-rws-piyush). – NStorm Sep 07 '21 at 16:31

0 Answers0