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

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -