I have a project that calls users' SSH servers to do some tasks. For now, I am storing users' passwords at my service as hashed (Username, hashed password and salt), but the SSH password (username, encrypted password and host address) is only encrypted by a known secret I have stored in server configurations with admin access only. The user count was very low, so that seemed okay, but now I'd like to improve this situation because I'm afraid that if my database or server gets accessed, they can access my users' servers too.
My question is how to store SSH credential my service needs to do maintenance job for other users?