When I try to use fabric, it gives me a remote shell after I authenticate. Then when I exit, the fabric task runs. Why is this?
Here’s the output I received:
user@locahost:~$ fab -H remote_host mytask
[remote_host] Executing task 'mytask'
[remote_host] run: python --version
[remote_host] Login password:
[remote_host] out: user@remote_host:~>exit
[remote_host] out: exit
[remote_host] out: Could not open a connection to your authentication agent.
[remote_host] out: Python 2.6.4
[remote_host] out:
Done.
Disconnecting from remote_host... done.
Right after I log in , I receive the following prompt user@remote_host:~> which I have to exit manually.
The contents of fabfile.py:
from fabric.api import run
def mytask():
run("python --version")
I’m using fabric version 1.2, by the way.
Could not open a connection to your authentication agent.tells me it’s looking for ssh-agent or somesuch. Take a look at the .login/.profile/.bash_profile of the host you’re connecting to for issues. Also, try initiating an SSH conneection manually and see if that gives any hints.