Passwordless OpenSSH login with interactively running script
Hi all,
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
3.4p1-1:
#!/bin/bash
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-upgrade
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?
Thanks,
Adam
--
To UNSUBSCRIBE, email to debian-security-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: