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!
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...
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
which puts the environment variables into the current session, and not
which just runs
ssh-agent -sand outputs the shell statements to run.