Once in while I need to login into my mac  via ssh, but I have my home folder encrypted with filevault.
If my user is already logged in all goes smoothly, but sometimes I just want to use my mac via terminal, without a graphical session.
While the system let a user login via ssh, his home folder is not automatically mounted, and all his informations are encrypted in a single .sparsebundle file.

The home folder can be mounted while logged in via ssh with:

sudo hdiutil attach -mountpoint /Users/username /Users/username/username.sparsebundle

Don't forget to umount the home with

sudo hdiutil detach /Users/username

before using a graphical session, or the system'll complain and won't let you log in.