If you need to trim the canvas also, simply go to Image>Canvas Size, set the drop down box to pixels and take 2 pixels off both width and height.
If you need to remove it from the image only, not the canvas, I can do it, but in a roundabout way, however, no matter how I try I can't see any other way to do it.
Here's how I did it....
1 - Open your image
2 - Unlock the layer by double clicking it
3 - Create a new layer and fill it white
4 - Apply a 2px stroke to the inside of the new layer, in a contrasting colour (red is good)
5 - Right click the new layer and make it a 'New Smart Object'
6 - Using the Magic wand tool, select the stroke only
7 - Highlight the first layer, and press delete
8 - Delete the new layer you created
9 - Deselect the border
Hey presto, your image has 2px removed, yet the canvas will be as it was.
Hope this helps