I am connecting the remote machine via ssh to execute one script in that server. My script in some other path than the default one, hence changing the path using cd command and executing the sctipt. This works fine. Now I need to export the current directoty of the remote server after ececuting the cd command during ssh.
To run the test.sh file successfuly, I need to assign the /dir/test/script/ value to one variable from the above script itself. I dont have rights to change the test.sh file itself on remote server as it is provided by thirdparty.
This is how I am trying
sss firstname.lastname@example.org cd /dir/test/script
log_dir=`pwd` (Also tried like log_dir='/dir/test/script/')
But my echo is not getting printed. Any suggestion.