The 24-year-old left-back has been without a club since he was released by Colchester in February but has featured in all of the Shrimpers' pre-season friendlies so far.
Boss Phil Brown told the club's official website: "He's done really well since he's come in on trial and really put a marker down.
"He has worked extremely hard and I think him and Anthony Straker are starting to form quite a nice partnership on the left-hand side.
"Having Ben sign gives us options as Straker can drop back if needed or Chris Barker can move to left-back. I'm delighted to have signed Ben and I'm sure he'll do very well."
And Coker is looking forward to the proper action getting underway.
"Pre-season has been tough work and I'm just delighted that I've done enough to earn a contract," he added.
"I've really enjoyed the last few weeks here and I've settled in nicely. I'm just looking forward to the season getting underway now."