I am trying to write a fab file which will do the auto deployment of my code on amazon server. So for that I am giving the SSH connection path at the top of the fabric method. But its not connecting and asking for password. I have the .pem file using which I am able to connect successfully from my Ubuntu terminal. But the same thing is not working when I am trying to do through fabric and its asking for password.
Example Code snippet of my fabric file.
from __future__ import with_statement
from fabric.api import *
from fabric.contrib.console import confirm
@hosts('-i /path/to/file/project.pem ubuntu@ec2-11-111-1111-11.mm-east-1.compute.amazonaws.com')
def host_type():
"""
Method used to see the machines OS.
"""
run('uname -s')
Is there any way to make it password less. Thanks