I have N hosts where can I do passwordless login via ssh to user root
.
For those machines I like to add a ssh-pub-key to authorized_keys of user postgres
.
Goal: I want passwordless login to user postgres
, too.
AFAIK the tool ssh-copy-id
does not help here, since I want the action "add ssh-pub-key to user postgres" to be passwordless.
How to solve this?