If you ever run into a situation when you can VNC into your Mac, but ssh isn’t working you may try the following. This has happened to me a couple times with my Mac Mini.

$ sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist
$ sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist