Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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'"
 
PREVIOUS NEXT
Tagged: #Run #multiple #commands #SSH #sudo
ADD COMMENT
Topic
Name
5+6 =