Hi,
I am unable to get $HOSTNAME value in a remote script when executed through SSH. Also the scripts hangs and doesnt return to the calling environment.
For instance
command -
ssh user1@box2 "cd /var/home/bin ; ./generateScript.sh"
Can any one plese throw light on the issue and also if there is a miss in environment setup or something.
P.S. - When i run the same script on different set of boxes the script works fine.
I didnt get the link you provided... can you explain in brief what can be the workaround?
ssh user1@box2 "echo \$HOSTNAME"
check whether you can able to get the box2 hostname. If yes, then you can pass it as argument to your script.
itkamaraj:
ssh user1@box2 "echo \$HOSTNAME"
check whether you can able to get the box2 hostname. If yes, then you can pass it as argument to your script.
I tried it on the box but it still results in empty HOSTNAME Value