I have login with root on a client server and use "su - u user1" to stimulate the user. Afterwards, I use "ssh-keygen -t rsa".
Afterwards, I use "ssh-copy-id -i id_rsa.pub server" to copy the user's key to another server. It ask for the user password.
However, I don't have the user's password and hence, I can't copy the keys to the server. What can I do ?
(actually, I have use root to copy the keys to the user 's .ssh directory but it doesn't work).
Any advise ? Tks