Diffie hellman small shared secret Is there a way to prevent the shared secret to be a small value (eg 4) to avoid easily succeeding brute force attacks? 

In $g^a \bmod p$, I understand that choosing $p$ not a multiple of $g^a$ is a first step.
But other than that, are there fast ways to achieve that goal?

Thanks
$p$ is a prime number and $g^a\bmod p$ will fall between $[1, p-1]$, so $p$ will never be a multiple of $g^a \bmod p$ unless $g^a= 1\bmod p$.
In Diffie Hellman, the secret exponents $a,b$ are chosen uniformly and randomly from $[1,q-1]$, where $q$ is a very large number. The probability that $Pr[g^{ab} = 4]$ or more generally $Pr[g^{ab} = x]$ for any $x$ in the group is negligible. This implies that for any integer $y=poly(n)$ where $n$ is the security parameter and $poly(\cdot)$ is any polynomial, $Pr[g^{ab} \le y]$ is negligible as well. So you don't need to worry about the key being a small value.