I am just learning Linux and I have setup ssh to connect to a server. To do that I need to generate the key for the ed25519 public-key scheme. Once generated, both the public key and the private key are stored in .ssh.
Therefore, if someone can hack into my computer and get access to the .ssh folder then basically the security offered by this ssh+public-key is hacked. My last defence is the fact that I have encrypted my private key using a passphrase.
Is my understanding correct?