Amtrak could do it, but those TSA jobs out in the middle of nowhere would really suck.
Commuter rail and transit could never make it happen in this country. In the Chicago area, Metra stations, for the most part, are wide open and tickets are checked on board, not as you pass through the station. So that would require fencing off every station (and somehow preventing access via the at grade tracks -- which effectively means total grade separation and fencing along every mile of commuter rail in the Chicago area -- hundreds of grade crossings and hundreds of miles of fence as well as raising or lowering the railroad grade over hundreds of miles of track) and figuring out how to man checkpoints at stations like the BNSF Route 59 station where 5800 people board on a typical day, most within a 2 hour window on something like a dozen trains. And keep in mind that commuter rail works because people can run for that train at the last minute. Put them in even a ten minute security line and they'll drive. Metra handles something like 150,000 daily commuters each way (300K total daily trips). And that means funneling all those people through chokepoints and backing them up outside secured areas. You've just created a whole bunch more targets. And the costs would be unbelievable. Take all those people off of mass transit and no one gets into the city (and if they did, they'd have no where to park).
Plus, you'd need a workforce of thousands who would staff checkpoints for a couple hours a day (first in the suburbs, then in the city center stations). You'd have a couple TSOs who would hang around the suburban stations all day for the few folks who reverse commute on trains every hour or so (two hours or so on weekends). Horrible waste of money.
Just for Chicago, the cost would be in the billions and billions just for infrastructure changes. The litigation and business disruption costs alone from many towns (raising or lowering the right of way would tear up many town centers for months) and the railroads would be in the billions. In some cases, I suspect that freight rail traffic would effectively stop -- not a good thing for railroads if Chicago falls off their map for a couple years. Most communities would not want a railroad viaduct running through town, nor would they want a 20 or 30 foot deep ditch running through town (think Hinsdale, Riverside and Barrington for starters). On the plus side, it would eliminate a lot of grade crossings and grade crossing accidents.
In Europe, the only real airline-style security that I experienced on trains was for the Eurostar, and I suspect that had more to do with the Chunnel than anything else.