:mod:`cloudmesh-common.cloudmesh.common.ssh.ssh_config` ======================================================= .. py:module:: cloudmesh-common.cloudmesh.common.ssh.ssh_config .. autoapi-nested-parse:: Managing ~/.ssh/config Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: cloudmesh-common.cloudmesh.common.ssh.ssh_config.ssh_config .. class:: ssh_config(filename=None) Bases: :class:`object` Managing the config in .ssh .. method:: names(self) The names defined in ~/.ssh/config :return: the names .. method:: load(self) list the hosts defined in the ssh config file .. method:: list(self) list the hosts in the config file :return: .. method:: __str__(self) The string representing the config file :return: the string representation .. method:: status(self) executes a test with the given ssh config if a login is possible. TODO: not yet implemented .. method:: login(self, name) login to the host defines in .ssh/config by name :param name: the name of the host as defined in the config file :return: .. method:: execute(self, name, command) execute the command on the named host :param name: the name of the host in config :param command: the command to be executed :return: .. method:: local(self, command) execute the command on the localhost :param command: the command to execute :return: .. method:: username(self, host) returns the username for a given host in the config file :param host: the hostname :return: the username .. method:: delete(name) :staticmethod: .. method:: generate(self, host='india', hostname='india.futuresystems.org', identity='~/.ssh/id_rsa.pub', user=None, force=False, verbose=False) adds a host to the config file with given parameters. #TODO: make sure this is better documented :param key: the key :param host: the host :param username: the username :param force: not used :param verbose: prints debug messages :return: