There are many answers to this one. We cruised round the world
for 10 years (arrived back in the UK end 2003).
We learned to always keep a supply of US dollars hidden on the boat (see our webpage re hiding money from pirates here
US dollars are still THE international currency for large parts
of the world. We also used travellers cheques to start with but soon gave up on that, not that easy to cash in many out of the way places. Credit cards and cash machine cards, again can be variable, depending on location.
In the latter part of the trip we tried to keep a supply of cash that would last to the next "big" place that would have a bank. Hotels are another source for getting cash with a credit card, also sometimes traders may cash on credit cards if you are buying
plenty of stuff from them.
In summary, keep US dollars cash to get you to the next port that is likely to have good facilities, BUT hide it well....see above link.