Discussion:
[Fab-user] linux ssh: Remote Host Identification failed
Prasant J
2016-12-05 06:06:07 UTC
Permalink
Hi,

I'm making a python GUI program that uses fabric and performs
operations on the remote device. I'm new to python as well as fabric.
My python program is al most complete.


My Query:
When the remote host identification has changed, fabric throws
Exception: NetworkError. Is there a way by which I can ask fabric to
bypass remote host identification check?

Any inputs will be of help to me.


Regards, Pj
Carlos García
2016-12-12 09:16:33 UTC
Permalink
Hi,

you can try to set disable_known_hosts to True. You can set it in the CLI
or using the env configuration dictionary.

fab --disable-known-hosts your-task -H your-host

You can check the docs here [
http://docs.fabfile.org/en/1.12/usage/fab.html#cmdoption-D]

Regards

2016-12-05 7:06 GMT+01:00 Prasant J <***@gmail.com>:

Hi,
Post by Prasant J
I'm making a python GUI program that uses fabric and performs
operations on the remote device. I'm new to python as well as fabric.
My python program is al most complete.
When the remote host identification has changed, fabric throws
Exception: NetworkError. Is there a way by which I can ask fabric to
bypass remote host identification check?
Any inputs will be of help to me.
Regards, Pj
_______________________________________________
Fab-user mailing list
https://lists.nongnu.org/mailman/listinfo/fab-user
​
--
Prasant J
2016-12-13 13:51:35 UTC
Permalink
Thanks Carlos for the response!


I'm using fabric as library in my program.
I'm setting up environment first (env.user, env.password) and then
using run() to execute the command.

How can I set "disable-known-hosts" in this case? (I know how to use
from command line)

Could you please point me to an example or provide some inputs so that
I can use this feature?

Regards, Pj

On Mon, Dec 12, 2016 at 2:46 PM, Carlos García
Hi,
you can try to set disable_known_hosts to True. You can set it in the CLI or
using the env configuration dictionary.
fab --disable-known-hosts your-task -H your-host
You can check the docs here
[http://docs.fabfile.org/en/1.12/usage/fab.html#cmdoption-D]
Regards
Post by Prasant J
Hi,
I'm making a python GUI program that uses fabric and performs
operations on the remote device. I'm new to python as well as fabric.
My python program is al most complete.
When the remote host identification has changed, fabric throws
Exception: NetworkError. Is there a way by which I can ask fabric to
bypass remote host identification check?
Any inputs will be of help to me.
Regards, Pj
_______________________________________________
Fab-user mailing list
https://lists.nongnu.org/mailman/listinfo/fab-user
--
Carlos García
2016-12-13 13:57:53 UTC
Permalink
Hi,

if you’re setting user and password, this should be super easy

from fabric.api import env

env.disable_known_hosts = True

If you are using fabric as a library, would be a good idea to have a setup
function or module, where you can set all relevant settings together.

Regards

2016-12-13 14:51 GMT+01:00 Prasant J <***@gmail.com>:

Thanks Carlos for the response!
Post by Prasant J
I'm using fabric as library in my program.
I'm setting up environment first (env.user, env.password) and then
using run() to execute the command.
How can I set "disable-known-hosts" in this case? (I know how to use
from command line)
Could you please point me to an example or provide some inputs so that
I can use this feature?
Regards, Pj
On Mon, Dec 12, 2016 at 2:46 PM, Carlos García
Post by Carlos García
Hi,
you can try to set disable_known_hosts to True. You can set it in the
CLI or
Post by Carlos García
using the env configuration dictionary.
fab --disable-known-hosts your-task -H your-host
You can check the docs here
[http://docs.fabfile.org/en/1.12/usage/fab.html#cmdoption-D]
Regards
Post by Prasant J
Hi,
I'm making a python GUI program that uses fabric and performs
operations on the remote device. I'm new to python as well as fabric.
My python program is al most complete.
When the remote host identification has changed, fabric throws
Exception: NetworkError. Is there a way by which I can ask fabric to
bypass remote host identification check?
Any inputs will be of help to me.
Regards, Pj
_______________________________________________
Fab-user mailing list
https://lists.nongnu.org/mailman/listinfo/fab-user
--
​
Prasant J
2016-12-14 07:12:31 UTC
Permalink
@Carlos: Thanks it worked.


Regards, Pj


On Tue, Dec 13, 2016 at 7:27 PM, Carlos García
Hi,
if you’re setting user and password, this should be super easy
from fabric.api import env
env.disable_known_hosts = True
If you are using fabric as a library, would be a good idea to have a setup
function or module, where you can set all relevant settings together.
Regards
Post by Prasant J
Thanks Carlos for the response!
I'm using fabric as library in my program.
I'm setting up environment first (env.user, env.password) and then
using run() to execute the command.
How can I set "disable-known-hosts" in this case? (I know how to use
from command line)
Could you please point me to an example or provide some inputs so that
I can use this feature?
Regards, Pj
On Mon, Dec 12, 2016 at 2:46 PM, Carlos García
Hi,
you can try to set disable_known_hosts to True. You can set it in the CLI or
using the env configuration dictionary.
fab --disable-known-hosts your-task -H your-host
You can check the docs here
[http://docs.fabfile.org/en/1.12/usage/fab.html#cmdoption-D]
Regards
Post by Prasant J
Hi,
I'm making a python GUI program that uses fabric and performs
operations on the remote device. I'm new to python as well as fabric.
My python program is al most complete.
When the remote host identification has changed, fabric throws
Exception: NetworkError. Is there a way by which I can ask fabric to
bypass remote host identification check?
Any inputs will be of help to me.
Regards, Pj
_______________________________________________
Fab-user mailing list
https://lists.nongnu.org/mailman/listinfo/fab-user
--
Loading...