tags:

views:

36

answers:

1

Hello.

I've been trying to figure out a way to do this for a few hours now, and am having no luck.

I have a large environment file that I have saved as a ksh script. This script works perfect if I type . ./setEnv.sh

However, what I'm trying to do is use either ssh or rsh to log on to a remote system, execute this script, then allow me to use the system in it's modified form. I am able to successfully execute the script, but the connection always closes after execution. I would like to be able to keep this connection open.

Any idea on how I can do this?

At the moment, it does not matter if I use SSH or RSH to accomplish this. RSH is preferable. I am using a variety of Linux and Solaris operating systems, so a catch-all method would be nice.

Thanks, Matt

+1  A: 

Couldn't you do something like that ?

ssh user@host "./setEnv.sh && your-command"

By the way, probably belongs on ServerFault or SuperUser.

Pierre Bourdon