I'd like to execute some sudo privilege commands using bash script from local to remote server via ssh without passing multiple commands separating from semicolons on ssh. I've tried below step but got error.
ssh -t user@remoteip 'bash -s' < services.sh
Though I've used -t option here it still shows error message.
sudo: sorry, you must have a tty to run sudo