#+LATEX_HEADER: \lstset{frame=shadowbox} #+LATEX_HEADER: \lstdefinelanguage{bash-local}{rulesepcolor=\color{cyan}} #+LATEX_HEADER: \lstdefinelanguage{bash-remote}{rulesepcolor=\color{yellow}} #+LATEX_HEADER: \lstdefinelanguage{bash-remote-root}{rulesepcolor=\color{orange}} #+PROPERTY: header-args :eval never #+ATTR_LATEX: :options language=bash-local #+BEGIN_SRC bash :results output :eval ask # Run this script on the local host # Install the key in the VM: ssh-copy-id -i ~/.ssh/vm \ -p 3022 address@hidden #+END_SRC #+RESULTS: #+ATTR_LATEX: :options language=bash-remote-root #+BEGIN_SRC bash # Run this as root on the remote host apt-get update apt-get -y install git #+END_SRC #+ATTR_LATEX: :options language=bash-remote #+BEGIN_SRC bash :results output :eval ask # Run this as a normal user on the remote host cd project git pull make #+END_SRC