The back legs have hooks that anchor the hermit crab into the shell without difficulty . As the hermit crab grows in size , it has to find a larger shell and abandon the previous one . This habit of living in a second hand shell gives rise to the popular name `` hermit crab '' , by analogy to a hermit who lives alone .