tags:

views:

65

answers:

2

Hi, I'm trying to deploy a django app with fabric and get the following error:

Alexs-MacBook:fabric alex$ fab config:instance=peergw deploy -H <ip> - 
u <username> -p <password> 

[192.168.2.93] run: cat /etc/issue 

Traceback (most recent call last): 

  File "build/bdist.macosx-10.6-universal/egg/fabric/main.py", line 

419, in main 

  File "/Users/alex/Rabota/server/mx30/scripts/fabric/fab/ 

commands.py", line 37, in deploy 

    checkup() 

  File "/Users/alex/Rabota/server/mx30/scripts/fabric/fab/ 

commands.py", line 140, in checkup 

    if not 'Ubuntu' in run('cat /etc/issue'): 

  File "build/bdist.macosx-10.6-universal/egg/fabric/network.py", line 

382, in host_prompting_wrapper 

  File "build/bdist.macosx-10.6-universal/egg/fabric/operations.py", 

line 414, in run 

  File "build/bdist.macosx-10.6-universal/egg/fabric/network.py", line 

65, in __getitem__ 

  File "build/bdist.macosx-10.6-universal/egg/fabric/network.py", line 

140, in connect 

  File "build/bdist.macosx-10.6-universal/egg/paramiko/client.py", 

line 149, in load_system_host_keys 

  File "build/bdist.macosx-10.6-universal/egg/paramiko/hostkeys.py", 

line 154, in load 

  File "build/bdist.macosx-10.6-universal/egg/paramiko/hostkeys.py", 

line 66, in from_line 

  File "build/bdist.macosx-10.6-universal/egg/paramiko/rsakey.py", 

line 61, in __init__ 

paramiko.SSHException: Invalid key 

Alexs-MacBook:fabric alex$ 

I can't connect to the server via ssh. What can be my problem?

Regards, Arshavski Alexander.

A: 

Going out on a limb here, I'd say your SSH key is incorrect:

paramiko.SSHException: Invalid key 

What does your servers say when you try to ssh into it, using the username and key password you have configured were providing in your fabfile to fabric?

On second thought: as you are providing fabric with a password, that might suggest your SSH host key has changed and / or has not yet been added to ~/.ssh/known_hosts.

wzzrd
A: 

Yeah, I'd say that the host key on the machine you're connecting to has changed. (Or you are connecting from a machine that never went through the "xxx is an unknown host, do you want to add it to the list of known hosts?" dialogue.)

If you are not concerned about man-in-the-middle attacks or have changed the key yourself a few days ago add the following line somewhere in your env.variables:

env.disable_known_hosts = True

that should take care of it!

rdrey