[TxMt] running command to remote computer via ssh

Allan Odgaard throw-away-1 at macromates.com
Tue Aug 15 20:47:01 UTC 2006


On 15/8/2006, at 19:44, Charles Stuart wrote:

> Is is possible to create a bundle command which would run a specified
> command to a remote computer via ssh? I am running Mac OS X, and I use
> Samba + ssh to work on my dev environment which is a Linux box.

Yes, that is possible. Everything you can do in a non-interactive and  
non-tty backed shell, you can do in a TextMate command.

> I repeatedly have to run a command to refresh the environment to check
> changes. I tried using quicksilver and the terminal plugin to send the
> command, but I couldn't figure out how to have it point the command to
> the active terminal window which was already ssh'd to dev box.

To run the command on a remove server you would just execute:

    ssh «server» «command»

That runs «command» on «server».

> I'm thinking the best solution might be to set up passwordless
> authentication via SSH and set the remote computer details in the
> script?

Yes, you would definitely need to generate a public/private key pair  
for this to work gracefully.





More information about the textmate mailing list