我正在尝试没有密码的Rsync使用rssh shell
ssh-keygen
和
ssh-copy-id -i /root/.ssh/id_rsa.pub '-p 12345 user@example'
但我无法得到以下消息
This account is restricted by rssh. Allowed commands: rsync If you believe this is in error, please contact your system administrator.
并且因为在rssh shell中唯一的工作命令是rsync,但是我怎样才能让rssh shell在没有密码的情况下工作呢?
谢谢
尝试使用rsync /root/.ssh/id_rsa.pub user@example/.ssh/authorized_keys发布您的密钥。
ssh-copy-id只是一个非常基本的shell脚本,可以将密钥文件复制到远程服务器。 没有魔法。 如果远程服务器上已经有authorized_keys文件,那么下载它,修改它并使用rsync重新发布。