Is it possible to terminal login remotely (outside local network) to my mac at home via SSH + VPN? With , I can access my mac at home via VNC.
When in the same network, I also can access it via ssh with the name NAME.local with the help of bonjour.

 

Then, is it possible to terminal login the mac at home via VNC + SSH or anything? I tried with NAME.local outside local network, but the name is not recognized. 

ADDED

ssh computername.`echo show Setup:/Network/BackToMyMac | scutil | sed -n 's/.* : *\(.*\).$/\1/p'`


also works fine.

Reference: http://smithjw.me/blog/2012/8/1/initiating-screen-sharing-or-back-to-my-mac-from-the-command.html
Yes, you can use the iCloud Back to My Mac address to SSH/VNC in. You can obtain your address using the following command.

dns-sd -E


The final line shows the account number.
Use the following syntax for determining the address:

computername.number.members.btmm.icloud.com


Providing you have port forwarded correctly, you can use this address to connect over SSH/VNC.