natalka
By:
natalka

SSH: Could not open a connection to your authentication agent

August 7, 2016 9.2k views
Networking

Hello

I accessed my server with ssh one time on from Ubuntu16.04

But when tried to connect next time I goy this error
"Could not open a connection to your authentication agent"
after executing
$ eval ssh-agent -s
$ ssh-add <path_to_private_key>

So I cant connect with ssh, and I don't have login or password.
How can I get at least a login and password to access the server?

Please, help :)
I am new to Ubuntu

1 comment
  • Can you share a little more information so we can best help you.

    • What operating system are you using on your local computer?
    • What SSH client are you using
    • If you're using a command line SSH client what exact command are you using to attempt your connection.
    • If you're on macOS or Linux, what is the contents of your ~/.ssh directory?
1 Answer

Instead of eval ssh-agent -s you may need to use:

exec ssh-agent bash

How this step is performed will vary depending on the OS you are on. This page has some other options and more information.

Have another answer? Share your knowledge.