I was wondering if there is an option for keeping milk on a long term basis?
UHT milk has been mentioned in a number of answers.
It is an excellent solution but some extra precautions will produce even better results.
When sealed UHT milk has a very long 'shelf life'.
Once opened, if access to bacteria and other contaminants occurs, as will usually be the case, you have something close to 'ordinary milk and 'the clock starts to tick'.
If you are opening either small one-use sachets or using up a larger container in a day or two at most in unrefrigerated conditions, or can refigerate the opened product, then no special handling may be needed.
If you want to be able to extend the life of a say 1 litre container of UHT milk then keeping the interior sterile is essential. If environmental contaminants get into the container then lifetime will not be vastly better than for "ordinary" milk.
If you can obtain UHT packages with a well defined spigot/tap assembly this may be an adequate starting point. If not then it will be "relatively easy" to provide a tap system that you can attach to your UHT containers of choice. This may require piercing a box or bag or similar. Worst case you may need a custom tap assembly with box-piercer and a surface adhesion system plus sterile insertion procedure (see below). That may sound "a bit OTT"* - and whether it is depends on your circumstances.
That's the first step.
Once you have a resealable hard barrier from inside to 'world' you need a procedure that ensures that product flow is always outwards and that contaminated material cannot enter at the moment a tap is opened. A tap with a short exit tube is probably as good as you can achieve without substantial effort. Before opening, clean the exit tube interior (water good, very dilute sodium hypochlorite solution (bleach) better). A relatively diluet Sodium Hypochlorite solution (N drops of bleach per known volume of water) can be weak enough to not upset the taste but do a good job of discouraging contaminants.
Once cleaned, point the tube downwards, and dispense enough UHT milk for say the next day or so of use.
Then turn off the tap, wash and/or sterlise the exit tube, perhaps place a cap on the end and return to storage.
How effective this is depends very much on how one-way your tap barrier is and what greeblies are waiting at the tap to go against the flow when you open the tap. Whether the effort is worthwhile depends greatly on journey duration, access to new supplies
and, OF COURSE, how much you like to have milk in your tea :-).