Load different lib paths for different machines during ssh.

Greetings to every one,
I have to access different clusters for computing.
But the problem is their lib paths are different. :eek:
How can i export some particular library paths for a particular machine ?
For example

Like cluster_1 (ip : 10.169.85.47)

export LD_libPATH="/opt/CUDA"

Like cluster_2 (ip : 10.115.63.13)

export LD_libPATH="/usr/lib/NVIDIA"

Like cluster_3 (ip : 10.174.66.42)

export LD_libPATH="/usr/lib/CUDA"

Like this i have around 5 different clusters to access by ssh.
Any suggestions :confused:

Wouldn't you be better off setting the LD_LibPATH environment variable in the ~/.profile or ~/.bashrc on each machine?

If you can't use login profile, for whatever reason, you may be able to use SendEnv in the .ssh/config or -o command line arg. Note this requires protocol 2 and AcceptEnv LD_LibPATH configured for the remote sshd_config.

1 Like

Thanks...
i got it.. :b: