I need to write a script that will SSH into a remote host, then run certain commands on that remote host, then exit. If I just do
ssh $host
#some command
the script will SSH in, wait until I manually exit, then run the commands.
How do I run those commands on the remote host?