AUTHOR
FIREWHEEL Team
DONE
DESCRIPTION

SSH to VM that is currently running in the FIREWHEEL environment.
This command supports running commands directly from a call to SSH.

.. warning::

    To use this, the following requirements MUST be met:
        * The VM must be running an SSH server.
        * The experiment must be run with the :ref:`control_network_mc` model component. For example: ``firewheel experiment tests.vm_gen:2 control_network minimega.launch``.
        * This Helper *MUST* be run from the cluster head node.

Arguments
+++++++++

Named Arguments
^^^^^^^^^^^^^^^

.. option:: -h, --help

    Show help message and exit.

Positional Arguments
^^^^^^^^^^^^^^^^^^^^

.. option:: <SSH options>

    The remaining standard SSH options, which includes the the hostname of the VM to SSH to. An optional username can be specified before the hostname as well. (i.e. ubuntu@vm.net).

Example
+++++++

``firewheel ssh ubuntu@host.root.net``

``firewheel ssh vyos@bgp.root.net``

``firewheel ssh ubuntu@vm.net touch /tmp/test``

DONE
RUN LocalPython ON control
#!/usr/bin/env python

import sys

from firewheel.cli.ssh_manager import SSHManager

if __name__ == "__main__":
    # Parse the command line inputs as an SSH command
    (dest, cmd), options = SSHManager.parse_cli_input(sys.argv)
    # Connect to the destination machine using SSH
    ssh = SSHManager()
    result = ssh(dest, cmd, options=options)
    sys.exit(result.returncode)
DONE
