Cannot rum multiple command on remote machine via SSH
Hi,
LAP1 is a Thinkpad that I use only at home as a poor man's desktop.
LAP2 is a second Thinkpad that I use mainly outdoors, on which I run an
SSH server to do some syncing every now and again.
Both using latest Debian stable with similar sets of apps.
At night, I want to connect to LAP2 and perform these commands:
$ sudo tlp setcharge 90 95 BAT1 # resets battery settings for external
battery
$ hibernate.sh # a script that performs some housekeeping, puts laptop
into hibernation and eventually disconnects sshd.
From LAP1 I can issue:
$ ssh LAP2 sudo tlp setcharge 90 95 BAT1 # it works
or:
$ ssh LAP2 hibernate.sh # it works too
but either:
$ ssh LAP2 "sudo tlp setcharge 90 95 BAT1 && hibernate.sh"
or
$ ssh LAP2 "sudo tlp setcharge 90 95 BAT1 ; hibernate.sh"
return:
hibernate.sh: command not found
Why?
--
Ottavio Caruso
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
Reply to: