fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fab-user] pubkey authentication


From: Ney, Daniel
Subject: [Fab-user] pubkey authentication
Date: Tue, 28 Jan 2014 16:58:04 +0000

Hi All,

 

I have been chasing an intermittent issue. I have tried multiple versions of paramiko (1.10, 1.11, 1.12) and fabric (1.6, 1.8). My test bed is currently running Python 2.7, Fabric 1.8.1, Paramiko 1.12.1 and Crypto 2.6.1. I am using public key authentication and the authentication fails about 1 out of 100 times. The code below reproduces the issue:

 

 

#!/usr/bin/env python

 

# -*- coding: utf-8 -*-

"""

Created on Tue Jan 28 08:13:08 2014

@author: dney

"""

 

from fabric.api import *

 

env.key_filename = '/home/dney/.ssh/key.pub'

env.hosts = [ '192.168.224.63' ]

env.shell = '/bin/sh -c'

env.path = '/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin'

env.user = 'root'

env.eagerly_disconnect = True

 

@task

def run_hostname():

    run('hostname')

   

for x in xrange(1000):

    execute(run_hostname)

    print 'Ran ', x, ' times'

 

 

When the code above is run, it eventually hits the exception in client.py at line 470. At the time of the exception, the server-side of the session displays:

 

Jan  1 02:43:58 ut authpriv.warn dropbear[8649]: pubkey auth bad signature for 'root'

 

So I guess the private key is not being generated in correctly and causes the signing encryption of the key to be incorrect 1% of the time. I was wondering if anyone has any insights into this issue and how to fix it?

 

Thanks in advance,

Dan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]