2021-09-02 18:01:03 +02:00

19 lines
678 B
Plaintext

#!/usr/bin/expect -f
###################################
############ by Sthope ############
###################################
## sudo apt-get install -y expect
## nano ~/.bashrc
## and add this to the end of the file: export PATH=$PATH:~/bin
## sudo chmod +x ~/bin/*;su -l $USER
#### USAGE
# Replace "Proxmox_Username", "Proxmox_IP", "Proxmox_Password" with your details
# Than enter on the terminal proxmoxupgradeyes and it will ssh into Proxmox and update, upgrade -y and autoremove -y
spawn ssh -o -o StrictHostKeyChecking=no -t Proxmox_Username@Proxmox_IP "apt-get update; apt-get upgrade -y;apt-get autoremove -y"
expect "assword:"
send "Proxmox_Password\r"
interact