Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning: Unable to load SSH config file '/root/.ssh/config' in fabric

Below is my code:

from fabric.network import ssh_config
from fabric.api import *
from fabric.context_managers import cd

env.use_ssh_config = True

env.hosts = ['172.16.11.16','172.16.11.17','172.16.11.18']
env.user = "monitorx"
env.password = "x@345"

def list_files():
        with cd('/home/monitor/Ngrex'):
                run('ls')


def get_uname():
        run("uname -a")

When I run fab list_files then I get the below error:

Warning: Unable to load SSH config file '/root/.ssh/config'

Any help?

like image 556
fear_matrix Avatar asked Jun 02 '16 08:06

fear_matrix


1 Answers

Found the solution. Simple create a file in .ssh/ directory with the name config:

touch /root/.ssh/config
like image 140
fear_matrix Avatar answered Oct 10 '22 16:10

fear_matrix