0

I'm newbie using ssh_key in fabric. After I follow the instruction in Using an SSH keyfile with Fabric, in my code:

import os

from fabric.api import *  

env.hosts = ['host.name.com']
env.use_ssh_config = True
env.user = "root"
env.key_filename = '/root/.ssh/config'

def local_uname():
local('uname -a')

In file config, there is my id_rsa.pub key. I get an error like this:

File "paramiko/paramiko/config.py", line 68, in parse raise Exception("Unparsable line {}".format(line)) 
Exception: Unparsable line

Can anyone help me, please?

serenesat
  • 4,611
  • 10
  • 37
  • 53

1 Answers1

0

You would set a config file like

env.ssh_config_path = '/root/.ssh/config'

or an SSH key like

env.key_filename = '/root/.ssh/id_rsa'

But setting a config file to be used as your SSH key makes no sense.

Nils Werner
  • 34,832
  • 7
  • 76
  • 98