fab-user
[Top][All Lists]
Advanced

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

Re: Two factor authentication?


From: Brandon Whaley
Subject: Re: Two factor authentication?
Date: Thu, 10 Nov 2022 18:34:26 -0500

The Connection.__init__() constructor sets self.client to an instance of the paramiko SSHClient class, so you can alter it as needed after init.  Connections are not actually established until Connection.open() is called, which happens automatically when using Connection.run or other functions that require the connection to be open.  If all you need to do is pass some kwargs to paramiko.SSHClient.connect(), the connect_kwargs argument of Connection() is the place for these.  If you are having trouble, please show how you are connecting and what you see vs what you expect.

https://docs.fabfile.org/en/stable/api/connection.html#fabric.connection.Connection:~:text=timeouts.connect.-,connect_kwargs,-(dict)%20%E2%80%93

On Thu, Nov 10, 2022 at 5:58 PM Jason Best <jbest@brit.org> wrote:
Hello,
I'm trying to use Fabric 2.7.1 to authenticate to a server that uses two factor authentication. From what I've seen, 2FA is possible in Paramiko (though I haven't tried this), but is it possible in Fabric? If it is, can someone point me to documentation or examples of how to do this?

Thanks!

Jason Best
Director of Biodiversity Informatics
Fort Worth Botanic Garden | Botanical Research Institute of Texas
1700 University Drive
Fort Worth, Texas 76107

817-332-4441 ext. 230
http://www.fwbg.org


reply via email to

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