The simple test case is this:
@max[git:master]$ /usr/bin/ssh max ls /Volumes
Macintosh HD
TM2
me
me9
@max[git:master]$
and
@max[git:master]$ /usr/bin/ssh max /bin/bash -c "ls /Volumes"
Applications
Calibre Library
Desktop
...
The latter is NOT doing an ls
of /Volumes/
but of my $HOME
directory.
This is a recent change. I've had a script that is > 10 years old that just started failing.
Here's another look:
@max[git:master]$ /usr/bin/ssh max /bin/bash -c "cd /Volumes && pwd"
/Users/layer
@max[git:master]$ echo $?
0
@max[git:master]$
It's weird that it just silently ignores the cd
.
This is on
ProductVersion: 15.3
BuildVersion: 24D60