@Serg I hope you don't mind my edit to
your answer. I think you're right about what's causing the OP's problem and, if so, then
just using a function instead of an alias (as my answer suggests) would not be sufficient. Whether the OP uses an alias or a function, the insight you have given in your answer (that it must be defined on the machine where the shell is actually being run!) is indispensable.