Search
 
SCRIPT & CODE EXAMPLE
 

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'"
Comment

PREVIOUS NEXT
Code Example
Shell :: batch text 
Shell :: ubuntu list compillers 
Shell :: bat configuration file 
Shell :: Create a bash script that asks users to change permission 
Shell :: install external windows package 
Shell :: git grep line only 
Shell :: Add branch to git prompt ubuntu wsl 
Shell :: ssh-copy-id specific file 
Shell :: force fsck debian 
Shell :: vim append to line 
Shell :: ng serve all interfaces 
Shell :: “Permission denied while trying to connect to the Docker daemon socket” while accessing docker image on jenkins 
Shell :: registry key programfilesdir 
Shell :: webpack for old browser 
Shell :: cant install cython buildozer 
Shell :: phenix applyncs 
Shell :: pip install tensorflow no matching distribution found for tensorflow 
Shell :: how to put access.log in gitignore 
Shell :: gastby yarn install 
Shell :: zsh arithmetic 
Shell :: how to edit etc/hosts linux error readonly 
Shell :: iris eyesaver 
Shell :: installing drive in jupyter lab 
Shell :: Bash script to use getopts to get multiple values from user 
Shell :: makefile shell if 
Shell :: Find all pods that status is NotReady sort count jq cheatsheet 
Shell :: Install Kite for Linux 
Shell :: how to install perl 
Shell :: git stash only untracked files 
Shell :: linux run compiled rust program 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =