Skip to content

Instantly share code, notes, and snippets.

@nwhobart
Last active December 23, 2016 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nwhobart/5bd6103d756361e711eb3a67edc7b18f to your computer and use it in GitHub Desktop.
Save nwhobart/5bd6103d756361e711eb3a67edc7b18f to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
ssh -t user@server.com 'df -h'
^^^^^^ does not work ^^^^^^^
ssh: command not found
------------------------------------------
#!/usr/bin/env bash
/usr/bin/ssh -t user@server.com 'df -h'
^^^^works fine^^^^^^
WHY THE FUCK DO I NEED TO SPECIFY A PATH FOR SSH?
"/usr/bin" is in my $PATH for `bash`
@derekbassett
Copy link

Try an 'echo $PATH' in your script to verify that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment