Termux-packages: OpenSSH: Could not open a connection to your authentication agent

Created on 16 May 2016  路  4Comments  路  Source: termux/termux-packages

Hi,

I've installed Termux and created a keypair in /data/data/com.termux/files/home/.ssh.

I've started the agent with: eval 'ssh-agent -s' and now I can't get the key to be added to my agent.

I'm trying to run: ssh-add /data/data/com.termux/files/home/.ssh/my_key or even ssh-add -l and I keep getting: _Could not open a connection to your authentication agent_

Anything I'm doing wrong here?

I've read there is an extra ssha command to use which would start the agent and add the keys but I can't seem to be able to run it either...

Thanks for the help!

Most helpful comment

Hm, I don't know if it's a formatting error (or if you run the commands by copying them) - but could the issue be that you are using single quotes instead of backticks? The right way should be

$ eval `ssh-agent -s`

which puts the environment variables into the current session, and not

$ eval 'ssh-agent -s'

which just runs ssh-agent -s and outputs the shell statements to run.

All 4 comments

Can you check if running logcat -s syslog:* shows anything?

Which device is this? Which Android version are you running? A custom rom or stock?

I'm on a OnePlusOne running Android 6.0.1 with Cyanogen 13.0.

The logcat -s syslog:* shows: --------- beginning of main.

It's weird because the agent has started and gets a PID:

$ eval 'ssh-agent -s'
SSH_AUTH_SOCK=/data/data/com.termux/files/usr/tmp/ssh-XXX/agent.3861; export SSH_AUTH_SOCK;
SSH_AGENT_PID=3862; export SSH_AGENT_PID;
echo Agent pid 3862;

Hm, I don't know if it's a formatting error (or if you run the commands by copying them) - but could the issue be that you are using single quotes instead of backticks? The right way should be

$ eval `ssh-agent -s`

which puts the environment variables into the current session, and not

$ eval 'ssh-agent -s'

which just runs ssh-agent -s and outputs the shell statements to run.

@fornwall++ Geez, I feel bad now...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Cyb3rD3m0n picture Cyb3rD3m0n  路  3Comments

reggi picture reggi  路  4Comments

StephanBeer picture StephanBeer  路  3Comments

zejji picture zejji  路  4Comments

jackbrycesmith picture jackbrycesmith  路  3Comments