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

Carlo Hamalainen carlo.hamalainen at gmail.com
Thu Apr 14 23:32:28 MDT 2011


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

-- 
Carlo Hamalainen
http://carlo-hamalainen.net


More information about the linux mailing list