A sufficiently long, randomly chosen, key can resist any practical brute force attack, though not in principle if an attacker has sufficient computational power (see password strength and password cracking for more discussion).
Unavoidably, however, pre-shared keys are held by both parties to the communication, and so can be compromised at one end, without the knowledge of anyone at the other.
There are several tools available to help one choose strong passwords, though doing so over any network connection is inherently unsafe as one cannot in general know who, if anyone, may be eavesdropping on the interaction.
This implies random key choice to force attackers to spend as much effort as possible; this is very difficult in principle and in practice as well.
As a general rule, any software except a cryptographically secure pseudorandom number generator (CSPRNG) should be avoided.