Skip to content

Pass commands to ssh in double quotes

During the recent release branching for v2021dev0, I ran into this problem. This still doesn't clarify how things worked so far, but I couldn't see any harm in wrapping the commands in double quotes

rrs@priyasi:~$ ssh niobium systemctl --no-legend --state=running --full list-units --all 'obs*' | cut -f 1 -d \
X11 forwarding request failed
19:51 ♒ ॐ  ☺ 😄
rrs@priyasi:~$ ssh niobium "systemctl --no-legend --state=running --full list-units --all 'obs*' | cut -f 1 -d \ "
X11 forwarding request failed
obsdispatcher.service
obsdodup.service
obspublisher.service
obsrepserver.service
obsscheduler@aarch64.service
obsscheduler@armv6hl.service
obsscheduler@armv7hl.service
obsscheduler@i586.service
obsscheduler@x86_64.service
obssrcserver.service
obswarden.service
19:51 ♒ ॐ  ☺ 😄

Signed-off-by: Ritesh Raj Sarraf ritesh.sarraf@collabora.com

Merge request reports