ssh PATH setting 

Symptom 

Can't launch rsync from within iitrc:

$ ssh -v iitrc rsync
debug: Sending command: rsync
debug: Entering interactive session.
bash: rsync: command not found

Reason 

rsync is there, at /opt/gun/bin. The problem is that ssh can't find it.

Solution 

cd /etc
ln -s init_script.sh environment
  • init_script.sh is source in profile, for rudimental setting.
  • /etc/environment is for ssh env setting.
[Tip]

!!

$ ssh iitrc type rsync
Warning: Remote host denied X11 forwarding.
rsync is /shared/local/bin/rsync

— /shared/…, yeah right!