ssh execute command remotely

Hi all,

Today I want to write a script to run the commands remotely.
If I run the command as follows:

ssh <user>@<ip> 'ls; pwd'

it works fine.

But when I want to use ssh to set view in clearcase, it will lose the response. as follows

ssh <user>@<ip> 'cleartool setview <view_name>; pwd'

What is the root cause of this? And how can I work out this problem?

Thanks
Damon

cleartool will set the session but ssh is waiting for the cleartool to return to execute the next command which will never happen until you exit from the view set. Once you do an exit, you will see that pwd gets executed. You can try this with a shell script also.

--ahamed