It's pretty illegal and dangerous if you don't know what you're doing, where you're going, when you should go, how you should go etc. Trespassing on rr property, reckless endangerment, that sort of thing. Not all that different from hopping trains!
Pretty easy to do on stretches of abandoned rail and areas that have extremely low traffic from what I can gather, although it's not any less illegal. There are some lines around the country that private groups (rr museums, motorcar clubs, etc. ) have bought rights of way for areas of abandoned track and/or worked out an agreement with the rail co. so they can travel the lines legally. NARCOA does alot of shit like that. This however is gonna be a long term project with lots of research and recon before any attempts at doing the run are made. Currently drawing up plans for construction, then a prototype build and testing. Then heading out west, figuring shit out, and doing another build.