ssh not sourcing the user profile
using ssh to logon to a remote unix box from my java code.
String[] cmd = {"cmd","/C","ssh -W pass testusr@server","/home/testusr/test.ksh"};
This code doesnt seem to source the testusr profile.
in the test.ksh i am writing the environment varibales to a file to see if the correct PATH variables have been set but i only see the below
this is what i have in the test.ksh
echo $PATH > test.out
This is what is written to the test.out.
/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java14/jre/bin:/usr/ja
va14/bin:/usr/local/bin:/usr/local/sec:/opt/quest/bin
which is not the testusr PATH. Looks like when i logon using the ssh it is not sourcing the testusr profile
anything special i need to do to source the profile?
Any help will be truly appreciated. thanks.
|