This question already has an answer here:
Let's say I have a SSH key-pair for accessing my systems. Private key is kept securely in my workstation and public key is distributed to servers and network equipment. Now there becomes a need to access a third party system over SSH. I could simply provide my existing public key to this third-party and they will later delete my public key from their systems once I no longer need access. However, are there any security benefits of generating temporary SSH key-pair for this temporary access? Only benefit I could see is that for example when this third-party forgets to delete my public key from their system and I have deleted my key-pair from my workstation, then if my workstation gets compromised, then third-party system is not in danger because I have deleted my temporary key-pair.