Hook also pleaded not guilty to one charge of the same offence.
This alleges that “on 13 July 2021, you did not treat information passed to yourself by Jaysley Beck in a manner consistent with its seriousness”.
Judge Adjutant General Alan Large told the defendants they will go on trial on 14 September, but it has not yet been decided whether the five-day hearing will be at Catterick, in North Yorkshire, or at Bulford Camp in Wiltshire.
A further case management hearing will be held on 23 June.
A number of Gunner Beck’s family were on the link listening to the 20-minute hearing.
The judge was told Hook is serving with 29 Commando Regiment Royal Artillery.
Shepherd, who appeared from the United States, is serving with the British Defence Staff in the country.