Hello,
I am trying to ssh to a remote machine then change the shell and execute the script. However the ssh session hangs when i try to change the shell
ssh user@host 'csh ; source /home/cshProfile; $HOME/exec.sh'
if i do
ssh user@host ' $HOME/exec.sh'
This works however i get errors as some of the env variables are in cshProfile file which is for cshell and the default shell of the remote user is ksh. so i have to first changet to csh on the remote machine, source the profile and execute the script.
Any advices?