Strange behaviour of ssh

Lukas Razik linux at razik.name
Mon Nov 7 22:28:33 EST 2011


Hello together!

I've Debian 6.0.3 with OpenSSH_5.5p1 and problem with the execution of remote commands via ssh.
It seems as if the first command isn't looked up in all "$PATH" dirs.

Here normally I should get the version information of mpirun twice but the first one fails:
$ ssh cluster2 mpirun --version ; mpirun --version
bash: mpirun: command not found
mpirun (Open MPI) 1.4.3

Here I should get the place of "mpirun" twice but the first "which" doesn't find an "mpirun" and prints nothing:
$ ssh cluster2 which mpirun ; which mpirun
/usr/mpi/gcc/openmpi-1.4.3/bin/mpirun

The echo command prints the right "$PATH":
$ ssh cluster2 echo "$PATH"
/usr/mpi/gcc/openmpi-1.4.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

So, does anyone of you have an idea what there could be wrong?
And does anyone know which shell scripts are loaded remotely by ssh?
Is it .bashrc or .profile or/and another one?

Many thanks for any answer!

Regards,
Lukas



More information about the openssh-unix-dev mailing list