I have a computer (computer A) which only can be accessed by ssh
from another computer (computer B) within internal network.
ssh username@10.**.**.**
FYI, I do not activate root account in computer A.
Later on, when I already login to the computer A, I modify the /etc/fstab
file by adding sudo -i
as additional line in it.
Finally, I reboot the computer A. Several minutes later, I try to login to computer A again but I can not.
Is it related to my modification or there is internal network down at the moment? Thanks
You don't put commands in the
fstab
. That file is just a list of mounts which should be automounted (or not). Themountall
command runs as root when you boot, and mounts everything which is listed in thefstab
. (Except those mounts which have thenoauto
options set infstab
, those ones are not automounted.) So you don't have to care aboutsudo
.If you put
sudo -i
intofstab
then themountall
command likely can't parse that file because of that syntax error: Themountall
command is trying to mount thesudo -i
drive or something more wrong. So yes, this is your problem.You rebooted your computer with a syntax error in
fstab
. As the system boots, it callsmountall
to mount the listed things fromfstab
.mountall
reaches thatsudo -i
line which he doesn't know what to do with. Your system is likely stuck at this point and waiting for interaction on what to do.