Any simple way to add .profile to ssh? -
i installed node.js nvm , register additional folder executables. adds new path $path variable, , somewhere in 1 of .profile
files.
so, when log in via ssh
manually works, npm
available. but, when try execute remote script ssh myhost.com "npm install"
it fails npm not found
.
it happens because when run ssh
remotely doesn't load .profile
.
is there easy way fix it? i.e. somehow tell ssh
use same env if log in manually?
the .profile
loaded login shells explained in manual page bash. can modify command run login shell:
ssh myhost.com "bash -l -c 'npm install'"
Comments
Post a Comment