We claim that all such $m$ are $p$,$2p$,$4p$, where $p$ is an odd prime. Note that the problem is equvivalent to the following: find all $m$, for wish there exist exactly one positive divisor $d$ of $m$, which can be expressed as $a^2-b^2$, where $(a,b)=1$. Note that if $m$ has $2$ or more odd divisors, then it can not satisfy the condition:every positive integer $2k+1=(k+1)^2-k^2$ and $(k+1)$ and $k$ are clearly coprime. So we only need to consider numbers $m=2^kp$, where p is a prime. But $8=3^2-1$, so $k\leq 2$. It's easy to verify that $p$,$2p$,$4p$ satisfy the condition.