I need to run a batch to login to server, get in sudo su - username and run specific commands.
sudo su - username
I tried below code:
putty username@server
You can use sh -c and then use semicolons between commands, I'd consider the solution suggested in the comments though, just have whole script run as sudo.
sudo sh -c "cd /tmp;pwd;cd /dev;pwd""