[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: SSH -- Running remote command and NOT Exiting



On Thursday 03 March 2005 11:32 am, Tony Godshall wrote:
> According to Hal Vaughan,
>
> > I know I can use SSH to run a remote command like this:
> >
> > ssh newhost command-to-run
> >
> > And if I have it set up to use RSA or some other type of authentication,
> > it'll connect to the system, log in automatically, and run
> > "command-to-run", then log out.
> >
> > But I can't find anything in the man page (or on Google, but there's a
> > high noise-to-signal ratio, including many copies of the man page) where
> > I can tell ssh to run a command on login and NOT exit.  What can I do to
> > make ssh login, run a command, then stay logged in, waiting for another
> > command?
>
> ssh's normal behavior is to stay connected until remote
> process has exited.
>
> what process are you running remotely?  does it fork and
> exit early?

I'm running several that set up my environment, then end so I can still use 
the command line.  See the other branches on this thread -- I got it to work 
with the help of a few suggestions.

Thanks.

Hal



Reply to: