Ahoy! Got a problem with bamt. I would have just put this as a reply in the bamt thread, but this applies to all versions of linux that use X.
Basically, sometimes when SSH-ing into a box I get an error like INVALID_MAGIC_COOKIE, it's a curse, but I have found that re-flashing my USB again sometimes fixes this.
The issue can be replicated if I start off with a fresh copy of bamt and then set the root password, and then as soon as you switch to the root user, if it says 'cannot create Xauthority file', then it's not going to work, re-do bamt again.
Sometimes I have to re-do bamt like 5 times to get it working properly. This is on numerous systems, eventually I get it all working fine but it takes forever.
Is there an actual solution to this?
I think something odd is going on... I haven't heard of other folks having this issue, and I'd think I would have if its happening so often.
Are you using the latest image (0.5c)? You might want to grab a fresh copy even if so.
Are you applying the fixes? Try applying all, then rebooting (just ignore the Xauth error if you see one). Does the problem go away?
Edit--- some other thoughts enter my head...
How quickly after power up are you doing this? The setup scripts have some delays to let X get loaded, and only at the end do they arrange the xauth stuff and make ssh work properly. Slow USB keys can make this time even longer. If you are jumping in before these run, you'll get bad results.
Second... why not just get it to work once, and then copy that key back to whatever PC you are using to write the stock image. Now make all future images from that new image.
Third.. how often are you reinstalling that this is actually an issue?