I am still learning about SSH, SFTP and private/public keys. My elementary understanding of keys is that the private key should remain on the machine it was generated on and never be shared.
I have a Lightsail instance that I would like to allow others to access using SFTP. The only way to do this is to download the key pair from the AWS account and use that file in the SFTP application (FileZilla in this case). If I want to provide SFTP access to these users I have to give them the server's private key file.
I'm not sure I understand how this is a secure way of giving SFTP access to the server if the private key is never supposed to leave the server. I can't easily revoke access because I would have to generate a new key pair on a new instance to do that and then share the new private key with all users for which I did not want to revoke access.
Can someone explain to me how this method is secure? Or maybe explain what I'm not understanding about how private/public keys work? Is this the appropriate method to give easily revoked SFTP access? If not, what is the appropriate method?