if someone publishes it on their servers or something, they should use the same license as we did.
If you allow modifications, then you need a copyleft license to achieve that goal. The GPL or AGPL licenses would be a good possibility. The AGPL license should be considered if it is possible to use your software in a SaaS offering and you want to keep it open-source also in that context.
You could also opt for a closed-source license that does not allow modification nor sub-licensing. Then others can only distribute the software as-is and under the same license.
we do not want anyone to sell the code as is
This requirement is not compatible with open-source licenses, because open-source licenses are not allowed to exclude commercial usage of the code, which includes selling it.
However, copyleft licenses like the GPL are not useful for building a business case on selling individual copies of the software. As recipients of GPL software also get the right to redistribute, your first buyer can also be your first competitor who can easily ask a lower price that you do.
For this reason, even though the GPL does not forbid selling the software, it is often used to discourage such practices.