There are a few different situations here.
Not enough information to determine ethics
In the example, we do not have any information regarding the business relationship this person has with the hosting provider. We cannot infer, then that this breaks the TOS, contract, or in any way is unethical. Some might claim that since SSH access isn't provided, then we can assume that shell access of any kind is prohibited, but I know many webhosts that allow you to put any PHP on the system you like, but will never provide SSH due to the constant support issues inexperienced people bring to the host. They would be happy to have such a script on their system.
Therefore this example exists in a possibly gray area, depending on your point of view, but ONLY if you assume quite a bit based on a small amount of information.
So in this situation, where not enough information is provided to determine the ethics, go ahead and post the answer, or upvote the answer that, under some circumstances may be ethically dubious, but cannot be assumed to be bad due to lack of information. A nice disclaimer is good, but not necessary.
Enough information to determine ethics
If you absolutely know that the answer is ethically wrong under any and all circumstances (all nations, countres, states, districts, municipalites, companies, religions, etc) given the question, then yes, downvote it, and PLEASE comment on why.
However, keep in mind that even if the answer is ethically wrong for the given question, future google searches may land on that page (no SSH access) and the answer, though ethically wrong for the question itself, may be ethically ok for someone searching on those terms that falls into this question.
So even when you know it's ethically wrong to implement a given solution under a particular set of circumstances, it is not ethically wrong to teach someone about possible solutions that may actually have benefit, either as teaching examples, or usable under other situations.
So, largely, I'm not in favor of downvoting because your system of ethics and surrounding assumptions prohibits it.
But the downvote is yours to do with as you please.
If you truly find it objectionable under all circumstances, though, flag it for moderator attention so it can be deleted.