Answers for "Run multiple commands over SSH as sudo"

0

Run multiple commands over SSH as sudo

ssh -t user@server sudo -- "sh -c 'apt update && apt upgrade -y'"
# For example, ec2 Debian or Ubuntu Linux server can be updated as follows
ssh -t ls.www-2 sudo -- "sh -c 'apt update && apt upgrade -y'"
Posted by: Guest on October-30-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language