run apt-get upgrade via ssh batch login doesn't work
I have a script that connects to all my machines and runs:
If instead I run apt-get upgrade, it gives an error about:
Not being able to find the path, correctly.
dpkg: `ldconfig' not found on PATH.
dpkg: `start-stop-daemon' not found on PATH.
dpkg: `install-info' not found on PATH.
dpkg: `update-rc.d' not found on PATH.
dpkg: 4 expected program(s) not found on PATH.
NB: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.
How to set the path correctly for a batch run of an ssh login for an
If you connect to a machine with a command listed as part of hte ssh
command it will connect non-interactivelly and run the command and exit
when the command completes.
ssh foo.example.com apt-get upgrade -y
--Luke CS Sysadmin, Montana State University-Bozeman