H
H
hrvasiliy2015-10-21 23:15:41
SSH
hrvasiliy, 2015-10-21 23:15:41

How to turn off "remembering" keys?

For SSH access on Mac OS, I use a standard terminal.
The story is this: I connected 1 time to root using a private key. Created a new user, logged out from under root. I'm trying to log in from under the new user user, but I forget to change the username while I changed the key to a new one. (ssh [email protected] -p port -i /path/to/user_key) and I get into the root user account! Then I tried to enter without a key at all and everything worked out. Then the most interesting thing is, I try to connect via SFTP through a third-party program - FileZilla and I freely enter without a password and a key. That is, the key is stored somewhere in memory.
The only option I found was to find the ssh service number and stop it, after that, when you try to log in, you already need to specify the key, but it’s enough to do this only 1 time and it’s back in memory.
Is it possible to disable this "remembering" keys?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ruslan Fedoseev, 2015-10-21
@hrvasiliy

ssh-agent running? caches keys

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question