skip to Main Content

How is it possible that I am still able to connect to the server although I’ve generated new rsa keys? Even after deleting them, I am still getting access to the server.
The client I am connecting from is Debian 10.

In the log I see the following:
Will attempt key: home/user_name/.ssh/id_rsa

And I also see:
Will attempt key: user_name@user_notebook

And that’s where it’s still getting the key from, even if I delete ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub.

How can I ensure that the only source for the rsa key is ~/.ssh/id_rsa?

2

Answers


  1. ssh -i /path/to/id_rsa [email protected]

    Also you can edit you config file as such

    Host server.domain.com
      IdentityFile ~/.ssh/id_dsa
    
    Login or Signup to reply.
  2. The key was probably cached by the ssh-agent. You’ll have to clear it there after having deleted the id files.
    See How to stop SSH working with removed private key for details.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search