The problem was with permissions for home directory:
[root@bitrix2 home]# tail -10 /var/log/secure
Aug 9 10:19:59 bitrix2 sshd[14294]: Authentication refused: bad ownership or modes for directory /home/backup
Aug 9 10:24:13 bitrix2 sshd[14401]: Authentication refused: bad ownership or modes for directory /home/backup
Aug 9 10:24:13 bitrix2 sshd[14401]: Authentication refused: bad ownership or modes for directory /home/backup
Aug 9 10:24:14 bitrix2 sshd[14402]: Connection closed by 10.10.10.4
Aug 9 10:27:31 bitrix2 sshd[14454]: Authentication refused: bad ownership or modes for directory /home/backup
Aug 9 10:27:31 bitrix2 sshd[14454]: Authentication refused: bad ownership or modes for directory /home/backup
Aug 9 10:29:08 bitrix2 sshd[14455]: Connection closed by 10.10.10.4
Aug 9 10:29:12 bitrix2 sshd[14490]: Authentication refused: bad ownership or modes for directory /home/backup
Aug 9 10:29:12 bitrix2 sshd[14490]: Authentication refused: bad ownership or modes for directory /home/backup
Aug 9 10:31:13 bitrix2 su: pam_unix(su:session): session closed for user backup
Then I checked permissions:
[root@bitrix2 home]# ls -la backup
drwxr-x--x 4 backup backup 4096 Авг 9 10:09 backup
And gave normal permissions:
[root@bitrix2 home]# chmod go+xr-w backup
[root@bitrix2 home]# chmod a+rx-w backup
[root@bitrix2 home]# ls -la
drwxr-xr-x 4 backup backup 4096 Авг 9 10:09 backup
Now it works fine
-e 'ssh ...
bit you may want to add the-i
option and full path to the private key you want to use-v
flag in the ssh client) and check the remote server logs and settings, public key auth may be disabled.