On Mon, Nov 01, 2010 at 12:24:10PM +0000, James Bensley wrote:
(Not infront of SSH right now so OTOMH): Can't you do something like:
ssh user@machine 'cd /a/directory; touch my_file'
No, if you do the above ssh connects to user@machine, does the cd, executes the touch and then disconnects again leaving you back at your original machine prompt. E.g. :-
chris$ ssh mws 'cd tmp; touch fred' chris$
... and it's created a file fred in ~/tmp on the machine mws.