Привет, коллеги.

Что-то я не могу понять где грабли.
Хочу с удалённого хоста скопировать rsync'ом /etc

Делаю:
(this_host) ssh-keygen -t rsa -f ~/.ssh/rsync
(this_host) scp ~/.ssh/rsync.pub remoteu...@remotehost:/tmp/
(remote_host) cat /tmp/rsync.pub >> /root/.ssh/authorized_keys
(remote_host) rm /tmp/rsync.pub

если на remote_host в /etc/ssh/sshd_config прописано PermitRootLogin yes
то на this_host нормально выполняется вот такая команда

(this_host) rsync -avuz -e "ssh -i /root/.ssh/rsync" r...@remotehost:/etc 
/var/backups/remotehost/

если же на remote_host в /etc/ssh/sshd_config прописываю
PermitRootLogin forced-commands-only

и правлю authorized_keys, прописывая
command="rsync -auz -e 'ssh -i /root/.ssh/rsync'  r...@remotehost:/etc 
/var/backups/remotehost/" ssh-rsa дальше_ключ

То обваливается вот так

Warning: Identity file /root/.ssh/rsync not accessible: No such file or 
directory.
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(635) 
[receiver=3.0.3]
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(635) 
[receiver=3.0.3]

Почему вдруг not accessible?

--
Peter Teslenko
Jabber: [email protected]


--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Ответить