I seem to be having a little issue with connecting to a remote server, to rsync
my backups
what i have done so far
run ssh-keygen
created public and private key
run ssh-copy-id -i my.key.pub 100.0.0.01
it all connected ok, i even went to remote server and checked
.ssh/authorized_key
and confirmed the key was there
but when i run ssh 100.0.0.01
it still asks for a password, plus when i run a cron
job to rsync
it fails with permission denied.
Does anybody have any ideas as to why it wont connect?
restorecon -R -v ~/.ssh
– Matt Mar 25 '16 at 17:13ssh
with the correct user name for the remote server? – Dan Getz Mar 25 '16 at 20:11my.key.pub
onssh-copy-id
suggests you named your privatekey filemy.key
not thessh-keygen
default.ssh/id_rsa
(ordsa
or whatever). If so, that file won't be used. You must either (1) put the file in.ssh
with the default name; (2) specify-i my.key
onssh
and-e 'ssh -i my.key'
onrsync
, plus path if not in the same dir; or (3) create or edit.ssh/config
to specify it. And in all cases it must be accessible only by your id. @roaima #269452 is for appk
file generated by PuTTY, clearly not the case for this Q. – dave_thompson_085 Mar 25 '16 at 21:01