Hi Jeff Forcier,

i try to use gateway option but even i setup env.hosts and env.passwords,
it still prompt me for username ade password


this is my configuration:

env.host=['root@x.x.x.x', 'root@y.y.y.y']
env.passwords=['root@x.x.x.x:'passwordx', 'root@y.y.y.y:'passwordy'']

@hosts('root@y.y.y.y')
def check_storage():
      with settings(gateway='root@x.x.x.x'):
            run("uname")


Is there a problem with what i did?



regards,
Naim S.





On Fri, Jul 19, 2013 at 5:15 AM, Jeff Forcier <j...@bitprophet.org> wrote:

> You can also just use the gateway option:
> http://docs.fabfile.org/en/1.6/usage/env.html#gateway
>
> On Wed, Jul 17, 2013 at 7:59 AM, Naim Shahidan <shahi...@mycrypto.biz>
> wrote:
> > okay, thats should solve the problem. thanks for your help
> >
> >
> > regards,
> > Naim S.
> >
> >
> > On Wed, Jul 17, 2013 at 10:56 PM, James Redmond <
> avatar.helj...@gmail.com>
> > wrote:
> >>
> >> Is there any reason you can't just use ProxyCommand within
> >> /etc/ssh/ssh_config?
> >>
> >> Host secondHost
> >>     Hostname secondHost
> >>     User john
> >>     ProxyCommand ssh -q -W %h:%p proxyHost
> >>
> >> $ ssh secondHost
> >>
> >>
> >>
> >> Regards,
> >>
> >> James
> >>
> >>
> >> On Thu, Jul 18, 2013 at 12:42 AM, Naim Shahidan <shahi...@mycrypto.biz>
> >> wrote:
> >>>
> >>> my aims is to ssh from one server to another without using
> >>> authorized_keys and interactive ssh. So when ssh to another server, i
> can
> >>> possibly execute another ssh command to another host without any
> password
> >>> prompt. I also will provide env.passwords and env.hosts.
> >>>
> >>>
> >>> so is like this:
> >>>
> >>>
> >>> 1.) call run() to ssh to server A
> >>>
> >>> 2.) from server A, i need to call another function to execute ssh to
> >>> server B. password for server B is inside env.password
> >>>
> >>>
> >>> sorry to give blur information, im quiet new to Fabric.
> >>>
> >>> regards,
> >>> Naim S.
> >>>
> >>>
> >>> On Wed, Jul 17, 2013 at 10:16 PM, Marshel Helsper
> >>> <mhels...@netprospex.com> wrote:
> >>>>
> >>>> This might be what you're looking for
> >>>>
> http://docs.fabfile.org/en/1.6/api/core/operations.html#fabric.operations.open_shell
> >>>>
> >>>> Though I feel that if you're using Fabric to create an interactive ssh
> >>>> session from one server to another it might be worth reconsidering
> what
> >>>> you're trying to accomplish and the solution to that. Obviously I
> don't know
> >>>> what you're trying to do, but I feel that from the information I have
> it's a
> >>>> bit "iffy".
> >>>>
> >>>>
> >>>> Thanks,
> >>>>
> >>>> Marshel Helsper
> >>>> QA/Release Engineer
> >>>> NetProspex Inc.
> >>>> mhels...@netprospex.com
> >>>>
> >>>>
> >>>>
> >>>> On Jul 17, 2013, at 10:01 AM, Naim Shahidan <shahi...@mycrypto.biz>
> >>>> wrote:
> >>>>
> >>>> Hi Marshel,
> >>>>
> >>>> Im thinking of using authorized_keys on this solution but is it
> possible
> >>>> to do it on interactive session?
> >>>>
> >>>>
> >>>> regards,
> >>>> Naim S.
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> On Wed, Jul 17, 2013 at 9:55 PM, Marshel Helsper
> >>>> <mhels...@netprospex.com> wrote:
> >>>>>
> >>>>> I imagine you would be able to use ssh through fabric from one server
> >>>>> to the next, assuming you don't need an interactive session and the
> user for
> >>>>> server A is in the authorized_keys for server B.
> >>>>>
> >>>>> Thanks,
> >>>>>
> >>>>> Marshel Helsper
> >>>>> QA/Release Engineer
> >>>>> NetProspex Inc.
> >>>>> mhels...@netprospex.com
> >>>>>
> >>>>>
> >>>>>
> >>>>> On Jul 17, 2013, at 3:10 AM, Naim Shahidan <shahi...@mycrypto.biz>
> >>>>> wrote:
> >>>>>
> >>>>> Hi,
> >>>>>
> >>>>> ive been using Fabric 1.6.1 and im wondering if possible to create
> ssh
> >>>>> session inside a remote server using Fabric. The flows goes like
> this:
> >>>>>
> >>>>>
> >>>>>
> >>>>> 1.) ssh to  server A
> >>>>>
> >>>>> 2.) inside server A, ssh to server B
> >>>>>
> >>>>> 3.) close both connection
> >>>>>
> >>>>>
> >>>>>
> >>>>> Your help much appreciated
> >>>>>
> >>>>>
> >>>>>
> >>>>> regards,
> >>>>> Shahidan
> >>>>> _______________________________________________
> >>>>> Fab-user mailing list
> >>>>> Fab-user@nongnu.org
> >>>>> https://lists.nongnu.org/mailman/listinfo/fab-user
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>
> >>>
> >>> _______________________________________________
> >>> Fab-user mailing list
> >>> Fab-user@nongnu.org
> >>> https://lists.nongnu.org/mailman/listinfo/fab-user
> >>>
> >>
> >
> >
> > _______________________________________________
> > Fab-user mailing list
> > Fab-user@nongnu.org
> > https://lists.nongnu.org/mailman/listinfo/fab-user
> >
>
>
>
> --
> Jeff Forcier
> Unix sysadmin; Python/Ruby engineer
> http://bitprophet.org
>
_______________________________________________
Fab-user mailing list
Fab-user@nongnu.org
https://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to