How can I permit SSH connection terminal programs to access Camera?
You can access the list of permissions in System Preferences => Security &amp; Privacy. Select the Privacy tab and then choose Camera in the list on the left. You can then checkmark the apps on the right that you want to have access to the camera. 

If you have previously denied access to a program, it should appear here where you can checkmark it to allow access again.

As you're running a command line program from within the Terminal, it is Terminal.app that appears in the list on the right - and this is the program that needs to be checkmarked.

UPDATE: After your edit I realize that your problem is specifically when run via SSH, and not in general via the command line. In that case try prefixing your command with the "open" command.

For example like this:

open -a /Path/To/imagesnap /Path/To/imagesnap