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

2023-02-08 Thread Greg Wooledge
On Wed, Feb 08, 2023 at 04:03:04PM +0100, to...@tuxteam.de wrote: > On Wed, Feb 08, 2023 at 09:31:00AM -0500, Stefan Monnier wrote: > > >> $ cat opt/bin/hibernate.sh > > >> mate-screensaver-command -l # Activates screensaver and locks > > >> the screen > > >>

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

2023-02-08 Thread tomas
On Wed, Feb 08, 2023 at 09:31:00AM -0500, Stefan Monnier wrote: > >> $ cat opt/bin/hibernate.sh > >> mate-screensaver-command -l# Activates screensaver and locks > >> the screen > >> sudo systemctl hybrid-sleep# Hibernate and suspend the system. Thi

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

2023-02-08 Thread Stefan Monnier
>> $ cat opt/bin/hibernate.sh >> mate-screensaver-command -l # Activates screensaver and locks >> the screen >> sudo systemctl hybrid-sleep # Hibernate and suspend the system. This >> will trigger activation of >>

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

2023-02-08 Thread Greg Wooledge
On Wed, Feb 08, 2023 at 12:00:13PM +, Ottavio Caruso wrote: > $ cat opt/bin/hibernate.sh > mate-screensaver-command -l # Activates screensaver and locks > the screen > sudo systemctl hybrid-sleep # Hibernate and suspend the system. This >

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

2023-02-07 Thread tomas
On Tue, Feb 07, 2023 at 10:12:10AM -0600, David Wright wrote: [...] > Have you tried typing these two characters into your frozen ssh: > > ~ . > > Just those two, at the start of the line (that's important). That's really important. So if you don't know, type first ENTER, then you are at the s

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

2023-02-07 Thread Greg Wooledge
On Tue, Feb 07, 2023 at 10:12:10AM -0600, David Wright wrote: > Have you tried typing these two characters into your frozen ssh: > > ~ . > > Just those two, at the start of the line (that's important). That's why I documented it as three characters -- Enter, Tilde, Period. It's slightly less con

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

2023-02-07 Thread David Wright
On Tue 07 Feb 2023 at 10:30:22 (+), 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 hibernat

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

2023-02-07 Thread Greg Wooledge
On Tue, Feb 07, 2023 at 02:20:25PM +, Ottavio Caruso wrote: > Am 07/02/2023 um 12:12 schrieb Greg Wooledge: > > On Tue, Feb 07, 2023 at 10:30:22AM +, Ottavio Caruso wrote: > > > The reason I cannot just ssh into LAP2 and then run hibernate.sh from the > > > shell is because, if I do, I get

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

2023-02-07 Thread Greg Wooledge
On Tue, Feb 07, 2023 at 10:30:22AM +, Ottavio Caruso wrote: > 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. https://mywiki.wooledge.org/BashFAQ/063

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

2023-02-06 Thread Greg Wooledge
On Mon, Feb 06, 2023 at 04:37:50PM -0600, David Wright wrote: > On Mon 06 Feb 2023 at 19:54:20 (+), Ottavio Caruso wrote: > > Am 06/02/2023 um 19:05 schrieb Greg Wooledge: > > > ssh LAP2 'type hibernate.sh; echo "$PATH"' > > > > _Touché !_ You nailed it: > > > > > > $ ssh LAP2 'type hibernat

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

2023-02-06 Thread David Wright
On Mon 06 Feb 2023 at 19:54:20 (+), Ottavio Caruso wrote: > Am 06/02/2023 um 19:05 schrieb Greg Wooledge: > > ssh LAP2 'type hibernate.sh; echo "$PATH"' > > _Touché !_ You nailed it: > > > $ ssh LAP2 'type hibernate.sh; echo "$PATH"' > bash: line 1: type: hibernate.sh: not found > /usr/local

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

2023-02-06 Thread Nicolas George
Greg Wooledge (12023-02-06): > On most Linux systems, including Debian, bash is built with a compile-time > option that makes it try to determine whether it's a child of sshd. If > it believes itself to be that, it will source ~/.bashrc even though it's > not an interactive shell. Oh! My day of n

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

2023-02-06 Thread Greg Wooledge
On Mon, Feb 06, 2023 at 07:54:20PM +, Ottavio Caruso wrote: > Am 06/02/2023 um 19:05 schrieb Greg Wooledge: > > ssh LAP2 'type hibernate.sh; echo "$PATH"' > > _Touché !_ You nailed it: > > > $ ssh LAP2 'type hibernate.sh; echo "$PATH"' > bash: line 1: type: hibernate.sh: not found > /usr/loc