I am developing an application where one can add SSH credentials for servers and then an automated python script can fetch those credentials to login to the server and perform certain automated tasks.
The issue that I am facing is how to securely store the SSH credentials on my server so that the python script can securely retrieve those credentials and perform its tasks. Also, since multiple server's credentials would be saved on my application, if my server gets compromised, the attacker would get access to a lot of servers
I obviously cannot hash the passwords as the python script would require the actual password to login to the server. What could be the recommended approach and cryptographic algorithms that I can use to securely store all the credentials.