Upvote:11
Yes, you can get your passport renewed from overseas i.e. from Ethiopian U.S. Embassy. This link will provide you list of documents required for this process.
But if you know it is going to expire sooner, then you should get it renewed before your travel, and same has been advised by US Embassy, and as per US Travel State guidelines.
Some countries require that your passport be valid at least six months beyond the dates of your trip. Some airlines will not allow you to board if this requirement is not met. Consider the following scenario: A country requires that you have at least six months of validity on your passport. You currently have seven months of validity on your passport. However, your trip is two months from now. At that point, you will only have five months of validity remaining on your passport which is not enough to satisfy that country's entry requirements. In this situation, you would need to renew your passport before you can make your trip.
You can check validations for the country to which you are traveling from this link, which states that for Ethiopia your passport should have a six months validity and some other conditions are mentioned here.