Passwordless OpenSSH login with interactively running script
Can anyone give me a tip as to how I can automate this:
Say I wish to run this script remotely and interactively using SSH
apt-get update &&
apt-get upgrade -u
(let's call the script "apt-upgrade")
This doesn't work:
$ ssh root@host '/root/apt-upgrade'
apt-get upgrade runs non-interactively. [And the path is wrong. But even
if the environment path is forced it still runs non-interactively].
This does work:
$ ssh root@host
apt-get upgrade runs interactively--but I have to run the apt-upgrade
script manually after logging in using SSH.
If there any way I can avoid having to run the script manually while
still getting an interactive session?
To UNSUBSCRIBE, email to email@example.com
with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org