refactor functions for adding ssh-keys to agent