[clug] ssh to box, run shell command, then leave shell open?

Alex Satrapa grail at goldweb.com.au
Fri Apr 15 00:07:04 MDT 2011

All three steps can be automated. Check my blog entry at http://manicdee.livejournal.com/91750.html - make sure to read the linked articles too!

I use some "cleverly" named AppleScripts to do things like start a MySQL server in one tab, load the Django web service in a second tab, and start a shell with virtualenvironment loaded in a third tab.

Alex Satrapa | web.mac.com/alexsatrapa | Ph: 0407 705 332

On 15/04/2011, at 7:32, Carlo Hamalainen <carlo.hamalainen at gmail.com> wrote:

> Hi,
> I often find myself doing this at work:
> $ ssh someone at remotebox
> $ source lots_of_dev_variables.sh
> $ cd /projects/blah/blah/blah
> (then I do stuff in the shell)
> Is it possible to automate the first three steps? There are a few
> answers on stackoverflow for this kind of question but they often
> involve running bash at the end of the ssh command, and that stuffs up
> environment variables

More information about the linux mailing list