Is using ssh keys out of the question?  Create a ssh key on the
machine you deploy from, and put the public key on both the gateway
and deployment machines.  Then if you forward your agent (I have
"ForwardAgent yes" in my ~/.ssh/config file), then the secret key on
your machine will be used on the gateway and deployment machines.

jdf

On Mon, Mar 8, 2010 at 9:47 PM, Asif Iqbal <[email protected]> wrote:
> How do I use gateway host to connect to hosts
> when my credentials (password) on gateway host is different from
> hosts ?
>
> Here is my simple capfile
>
> set :gateway, "gw.example.net"
> role :myhosts, *File.open("hosts").map { |host| host }
> task :uname, :roles => :myhosts do
>  run "uname -a"
> end
> task :puppet, :roles => :myhosts do
>  run "ps -ef | grep puppetd"
> end
>
> I get only prompted for login to gateway and that credential is being
> tried to access the hosts.
>
> Thanks for any help.
>
> --
> Asif Iqbal
> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
>
> --
> * You received this message because you are subscribed to the Google Groups 
> "Capistrano" group.
> * To post to this group, send email to [email protected]
> * To unsubscribe from this group, send email to 
> [email protected] For more options, visit this group at 
> http://groups.google.com/group/capistrano?hl=en



-- 
Jeremy D. Frens
[email protected]
http://www.norecess.org/

-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to 
[email protected] For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

Reply via email to