CentOS rsync between servers using keyfile to pass credentials
-
@JaredBusch said in CentOS rsync between servers using keyfile to pass credentials:
@stacksofplates said in CentOS rsync between servers using keyfile to pass credentials:
So to reiterate, here's what I'd do:
If you don't need elevated privileges use a regular account.
ssh-keygen -t rsa -b 4096
Just enter through the prompts
Then:
ssh-copy-id -i user@remotehost
Then do the same for the other machine.
What's your output of
ls -lZ
in the/home/user/.ssh/
directory?$20 says if you just did a
touch authorized_keys
it's going to have the wrong permissions/context.No, my $20 is on he did not "just enter through the prompts"
I did not (just enter through), doing it now.
-
Wow, so simple, but still when attempting the rsync operation, I'm being prompted for the remote server root password.
Any ideas on that?
-
Nevermind, seems to work when I don't bother telling the system to use the authorized key.
-
@DustinB3403 said in CentOS rsync between servers using keyfile to pass credentials:
Nevermind, seems to work when I don't bother telling the system to use the authorized key.
That IS kinda the idea. ssh just handles that for you, even when called from another program like rsync.