git - ssh agent forwarding not working on ec2 -


i'm trying use ssh agent forwarding on local machine dont have use private key on remote server git clone git@bitbucket.org:username/bucketname.git

i have following setup on machine:

 $cat ~/.ssh/config     host bitbucket.org      identityfile ~/.ssh/id_rsa      host 172.28.128.3      forwardagent yes 

and have added public key bitbucket site

when run ssh -t git@bitbucket.org shows

logged in <username>. can use git or hg connect bitbucket. shell access disabled. 

means ssh protocol working right , can clone repo.

but when run on remote machine/host ( mentioned in .ssh/config file ip 172.28.128.3)

buntu@remotemachine$ ssh -vt git@bitbucket.org openssh_6.6.1, openssl 1.0.1f 6 jan 2014 debug1: reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: applying options * debug1: connecting bitbucket.org [131.103.20.168] port 22. debug1: connection established. debug1: identity file /home/ubuntu/.ssh/id_rsa type 1 debug1: identity file /home/ubuntu/.ssh/id_rsa-cert type -1 debug1: identity file /home/ubuntu/.ssh/id_dsa type -1 debug1: identity file /home/ubuntu/.ssh/id_dsa-cert type -1 debug1: identity file /home/ubuntu/.ssh/id_ecdsa type -1 debug1: identity file /home/ubuntu/.ssh/id_ecdsa-cert type -1 debug1: identity file /home/ubuntu/.ssh/id_ed25519 type -1 debug1: identity file /home/ubuntu/.ssh/id_ed25519-cert type -1 debug1: enabling compatibility mode protocol 2.0 debug1: local version string ssh-2.0-openssh_6.6.1p1 ubuntu-2ubuntu2 debug1: remote protocol version 2.0, remote software version openssh_5.3 debug1: match: openssh_5.3 pat openssh_5* compat 0x0c000000 debug1: ssh2_msg_kexinit sent debug1: ssh2_msg_kexinit received debug1: kex: server->client aes128-ctr hmac-md5 none debug1: kex: client->server aes128-ctr hmac-md5 none debug1: ssh2_msg_kex_dh_gex_request(1024<3072<8192) sent debug1: expecting ssh2_msg_kex_dh_gex_group debug1: ssh2_msg_kex_dh_gex_init sent debug1: expecting ssh2_msg_kex_dh_gex_reply debug1: server host key: rsa 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40 debug1: host 'bitbucket.org' known , matches rsa host key. debug1: found key in /home/ubuntu/.ssh/known_hosts:1 debug1: ssh_rsa_verify: signature correct debug1: ssh2_msg_newkeys sent debug1: expecting ssh2_msg_newkeys debug1: ssh2_msg_newkeys received debug1: roaming not allowed server debug1: ssh2_msg_service_request sent debug1: ssh2_msg_service_accept received debug1: authentications can continue: publickey debug1: next authentication method: publickey debug1: offering rsa public key: /home/ubuntu/.ssh/id_rsa debug1: authentications can continue: publickey debug1: trying private key: /home/ubuntu/.ssh/id_dsa debug1: trying private key: /home/ubuntu/.ssh/id_ecdsa debug1: trying private key: /home/ubuntu/.ssh/id_ed25519 debug1: no more authentication methods try. permission denied (publickey). 

i using ec2 instance remote machine.

please me in resolving issue.

i highly recommend link set ssh forwarding agent guide ssh agent forwarding

try troubleshooting this:

1) check have written correct host ip in local machine .ssh/config

2) on local machine, run command --> echo "$ssh_auth_sock"

  • if gives empty response, : eval ssh-agent -s && ssh-add -k

3) should working now


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -