I've been struggling with this for a couple hours so any help is greatly appreciated...I have 2x servers both of which I can ssh to with public keys from OSX, no issues at all there so I'm certain everything is good with sshd_config. I'm trying to configure a cron job for rsync to sync the two servers and need server B (backup) to ssh into server A using a public key. I cannot for the life of me work out why it doesn't find my public keys - they are in ~/.ssh/ (ie. /root/.ssh) and all file permissions are correct on A & B. This is the output:debug2: we did not send a packet, disable methoddebug3: authmethod_lookup publickeydebug3: remaining preferred: keyboard-interactive,passworddebug3: authmethod_is_enabled publickeydebug1: Next authentication method: publickeydebug1: Trying private key: /root/.ssh/identitydebug3: no such identity: /root/.ssh/identitydebug1: Trying private key: /root/.ssh/id_rsadebug3: no such identity: /root/.ssh/id_rsadebug1: Trying private key: /root/.ssh/id_dsadebug3: no such identity: /root/.ssh/id_dsadebug2: we did not send a packet, disable methoddebug3: authmethod_lookup passworddebug3: remaining preferred: ,passworddebug3: authmethod_is_enabled passworddebug1: Next authentication method: passwordAlso note it is looking for private keys which don't exist... drwx------. 2 root root 4096 May 25 10:15 .dr-xr-x---. 4 root root 4096 May 24 18:52 ..-rw-------. 1 root root  403 May 25 01:37 authorized_keys-rw-------. 1 root root    0 May 25 01:41 config-rw-------. 1 root root 1675 May 25 02:35 id_rsa_tm1-rw-------. 1 root root  405 May 25 02:35 id_rsa_tm1.pub-rw-------. 1 root root  395 May 25 02:36 known_hosts
SSH public key won't send to server
ssh;key authentication
Have a look at your ssh man page:   -i identity_file          Selects a file from which the identity (private key) for public          key authentication is read.  The default is ~/.ssh/identity for          protocol   version   1,   and  ~/.ssh/id_dsa,  ~/.ssh/id_ecdsa,          ~/.ssh/id_ed25519 and ~/.ssh/id_rsa  for  protocol  version  2.          Identity files may also be specified on a per-host basis in the          configuration file.  It is possible to have multiple -i options          (and  multiple  identities  specified  in configuration files).or the ssh_config man page:   IdentityFile          Specifies a file from which the user's DSA, ECDSA,  ED25519  or          RSA   authentication   identity   is   read.   The  default  is          ~/.ssh/identity for  protocol  version  1,  and  ~/.ssh/id_dsa,          ~/.ssh/id_ecdsa, ~/.ssh/id_ed25519 and ~/.ssh/id_rsa for proto          col version 2.  Additionally, any identities represented by the          authentication  agent  will  be  used for authentication unless          IdentitiesOnly is set.You see, there are a few special file names which are tried if you do not specify a key. Those are also the files you see in your log output.To use a key in a file with different name you have three options:specify the file explicitly using the above -i option.configure the file in your client config using the above IdentityFile option.add the key to your agent using ssh-add.For interactive sessions the agent is the most flexible one. For your cron job the -i option is probably the easiest one.