One simple solution, if you do not wish to concrete them in, is to use 4 posts. 2 at each end. Place all four posts along the same line. The outer posts should be about 2 1/2 or 3 feet from the inner ones. Then use a good stout wire, such as close-line wire to attach the tops of the two posts together. Repeat at the other end. You now have a situation where any pull exerted on the two inner posts is transmitted (and shared) by the two outer posts. Effectively giving you twice the holding power. I use close-line tighteners to snug everything up. That is those turnbuckles with an eye-bolt coming out of each end. Easy to re-tighten later as things shift and stretch a bit.
Another very old trick for situations like this is the use of a "deadman." or sometime called a "sleeper." In this case, you would set your two upright poles into the ground. Then at either end and also in a straight line, dig a ditch the length of the post and about 2 or 3 feet deep, and bury an entire post, with a stout wire, chain, or cable attached to the far end and coming up out of the ground and attaching to the top of your upright. You now have even more holding power than in the previous example and you only have two posts visible. Use treated wood. The only drawback to this method is the wire running at a 45 degree angle from the top of the two posts into the ground could be a tripping hazard. I guarantee you will NEVER pull these out of the ground.