I am trying to execute a remote script on a server via SSH. Simple enough. I can do it through interactive SSH:
ssh username@host
pipenv install
And this works just fine. However, when I try to run the command all at once:
ssh username@host "pipenv install"
I get the following error:
pipenv: command not found
Why on earth might this be the case? My first thought was that I was getting dropped into a different shell (like sh), but running ssh username@host 'echo $SHELL'
gives me the result of /bin/bash
, which is exactly the same that I get via interactive ssh. What might be going on here? I was under the impression that interactive ssh was identical to non-interactive ssh.