从另一台服务器远程运行Shell命令时出错

我有2台服务器都是Ubuntu的serverA和serverB

我正在serverB的shellA上运行一个shell命令,但似乎我需要做一些转义的确切命令到达serverB。 服务器B上的命令没有和任何事情之后。 有没有反正我可以确保确切的命令到达serverB:

我正在serverA上做这个

ssh root@serverB 'processthis -a example.com/?a=1,2,3&m=a,b,c' 

需要到达serverB的实际命令是:

 processthis -a example.com/?a=1,2,3&m=a,b,c 

但到达那里的命令是

 processthis -a example.com/?a=1,2,3 

谢谢

试着把这个论点放在一个双引号中去处理。

  ssh root @ serverB'processthis -a“example.com/?a=1,2,3&m=a,b,c”' 

你应该通过bash来处理&。 尝试这个:

sh root @ serverB'processthis -a example.com/?a=1,2,3\&m=a,b,c'