我试图使用ssh-copy-id将我的id_rsa.pub复制到远程主机中的~/.ssh/authorized_keys中。
我执行以下操作:
$ ssh-copy-id remoteuser@remotehost但我有以下错误:
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
remoteuser@remotehost's password:
rootsh: bad characters in arguments发布于 2018-08-03 08:49:17
看起来这台服务器使用的是名为树根的东西。本教程的标题是:如何跟踪Linux用户的活动?也涵盖它。
rootsh:争论中的坏角色
在这些类型的场景中,您可能需要将ssh到服务器,然后手工将SSH密钥对的公共部分复制/粘贴到用户帐户的$HOME/.ssh/authorized_keys文件中。
注意:您的SSH密钥通常在本地系统上:~/.ssh/id_rsa.pub。因此,在编辑器中打开它,将其复制到剪贴板上,然后将ssh复制到远程服务器,打开authorized_keys文件(上图),并将剪贴板粘贴到剪贴板中并保存。
发布于 2018-08-03 09:10:34
尝试以下命令:
cat ~/.ssh/id_rsa.pub | ssh user@hostname 'cat >> .ssh/authorized_keys
https://unix.stackexchange.com/questions/460262
复制相似问题