On Wed, Dec 11, 2013 at 10:36 PM, Rob <robpill...@gmail.com> wrote: > [local-machine %] ssh user@host & && xmessage connected > [ssh-machine %] ... > > `xmessage connected' will be executed even though ssh hasn't exit(0)'d > yet.
bash: syntax error near unexpected token `&&' You probably meant this: $ { ssh user@host &; } && xmessage connected Still, you would always be running "xmessage connected" even in the case of "ssh user@host" failing, which is not what he wants. -- Fernando