SSH/SHH-COPY-ID适用于root,但其他用户不适合
我正在尝试通过ssh-copy-id
将SSH作为非根用户进入我的Ubuntu服务器。在我的本地计算机上ssh-copy-id root@server
正常工作,但是当我运行ssh-copy-id其他@server时,我会获得允许拒绝(publicKey)。
错误。 主页/其他
目录是完全空的。作为对方用户,我该怎么办才能使用SSH
I am trying to enable SSH into my Ubuntu server as a non-root user via ssh-copy-id
. On my local machine ssh-copy-id root@server
works fine but when I run ssh-copy-id other@server I get a Permission denied (publickey).
error. The home/other
directory is completely empty. What do I have to do to utilize an ssh as the other user
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在远程计算机上,创建
./ ssh
在其他用户目录内部的文件夹。然后在此目录的内部创建一个名为授权的文件
的文件。将公共密钥从本地主机复制到此文件中,您现在可以通过ssh other@server
进入服务器中的SSHOn your remote machine create a
./ssh
folder inside of the other users directory. Then inside of this directory create a file calledauthorized_keys
. Copy the public key from your local host into this file, you will now be able to ssh into your server viassh other@server