fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] How to specify pem file path when using gateway in Fabric


From: Roshan Shetty
Subject: Re: [Fab-user] How to specify pem file path when using gateway in Fabric
Date: Tue, 16 Aug 2016 11:01:16 +0530

I tried to use `env.use_ssh_config`

But it's not working.

because Fabric is not using the ssh config file of gateway server. So it will prompt for password

Issue is posted here (http://serverfault.com/questions/685141/fabric-using-ssh-config-settings-on-env-gateway)

Regards,
Roshan


The only way to do great work is to love what you do. If you haven’t found it yet, keep looking. Don’t settle. As with all matters of the heart, you’ll know when you find it.” - Steve Jobs

On Mon, Jul 25, 2016 at 10:05 PM, R M Waters <address@hidden> wrote:
You could try using `env.use_ssh_config` instead of gateway, and use a local ssh client config that works how you want outside of fabric (i.e. you can log into the final host through the jump host using the existing keyfiles, using ProxyCommand/IdentityFile).  I suppose that fabric instructed to use that config *should* then work as well (but I don't know for sure, apologies).  Here is an SO answer that seems to explain how to do what you are asking with ~/.ssh/config: http://serverfault.com/a/337328

On Sun, Jul 24, 2016 at 2:07 PM, Roshan Shetty <address@hidden> wrote:

Hi,

I have asked this question on stack overflow but i haven't received any response.

My scenario:

Local host -> Gateway -> Remote host

I am using env.gateway variable to specify gateway host.

sample code

`env.user = "ec2-user"

 env.key_filename = ["/home/ec2-user/.ssh/internal.pem","/home/roshan.r/test.pem","/home/ec2-user/.ssh/test2.pem"]

 env.hosts = ['x.x.x.244', 'x.x.x.132']      
 env.gateway = 'x.x.x.189'

 def getdate():
      content = run('date')

`
My problem is with pem key path.

/home/roshan.r/test.pem is located in current directory. which is used for login into gateway server.

Other two mentioned pem files are located in gateway servers. Those will be used to login to next machie.

When i run this program i'm getting file not found error.

Thanks for any help !!



Regards,
Roshan


The only way to do great work is to love what you do. If you haven’t found it yet, keep looking. Don’t settle. As with all matters of the heart, you’ll know when you find it.” - Steve Jobs

_______________________________________________
Fab-user mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fab-user




reply via email to

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