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

Re: SOLVED Re: Cannot rum multiple command on remote machine via SSH



On Tue 07 Feb 2023 at 10:30:22 (+0000), Ottavio Caruso wrote:
> Am 06/02/2023 um 22:43 schrieb Greg Wooledge:
> > Seems pretty obvious to me.  It was a false claim all along.
> 
> How do you get to that statement?

To show it wasn't a false claim, you have to demonstrate that

  $ ssh LAP2 hibernate.sh

works (as posted 4 Feb 2023 11:24:37) whereas

  $ ssh LAP2 'type hibernate.sh'

doesn't (as posted 6 Feb 2023 19:54:20). You haven't done that yet.


Assuming that "sshd into LAP2" means what most people would understand
it to mean, then your following comments are irrelevant. When you
"ssh into LAP2" without a command following the characters:

  s s h  L A P 2

then you get a login shell. In that case, it's hardly surprising that
hibernate.sh will run. I think I've reread the OP "properly", and
logging in to LAP2 with ssh is not what it's about, presumably for the
reason given below.

> If I had sshd into LAP2 and run hibernate.sh, it would have run as it
> is in bash custom PATH.
> 
> The reason I cannot just ssh into LAP2 and then run hibernate.sh from
> the shell is because, if I do, I get a dangling zombie ssh shell that
> freezes my LAP1. (Now this would be a topic for another thread, but I
> don't care as LAP1 is almost dead and I want to squeeze it until it's
> gone).

Have you tried typing these two characters into your frozen ssh:

~ .

Just those two, at the start of the line (that's important).

Cheers,
David.


Reply to: