That's Lt. George Armstrong Custer (Union Army) reclining with a dog that looks like an over-large Fell Terrier -- almost a Border Terrier.
This picture was taken on May 20, 1862 during the middle of the Peninsula Campaign in Virginia.
Custer was a true dog man (all kinds, but running dogs when he got out West).
Click on the picture for a HUGE version -- the best quality version of this picture I have ever found. What detail! What facial hair!