作者raynoz (Raynoz)
看板Linux
標題[問題] 無法使用ssh-copy-id root@IP
時間Fri Oct 15 07:42:57 2021
是這樣的
最近在學習用ansible部屬K8S
參考網站:
https://reurl.cc/vg0ZQA
mgmt 192.168.0.101
node1 192.168.0.102
其中要在mgmt這台輸入ssh-copy-id
[email protected]把私鑰丟過去node1
都會顯示access denied
已有
1.passwd root 修改root密碼
2.修改sshd_config >>>PermitRootLogin yes
3.重啟sshd systemctl restart sshd
也有看到2018的文章說要在sshd_config內新增
AllowUser root
這段
但還是一樣
不知道有沒有人知道怎解
Ubuntu版本20.04
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 211.75.6.134 (臺灣)
※ 文章網址: https://www.ptt.cc/bbs/Linux/M.1634254979.A.D63.html
推 holishing: 查一下 sudo journalctl -u ssh 自己問題自己解 10/15 10:03
→ holishing: 懷疑是權限(mode bits)設定錯了但沒證據 10/15 10:05
推 chang0206: 不要copy id 直接ssh 會過嗎? 10/15 10:29
→ chang0206: 另外,真的不要開PermitRootLogin 非常危險 10/15 10:29
→ giraffe4527: 如果有啟用ufw關掉看看 10/15 14:42
推 holishing: ufw 有開的話連 access denied 都不會出現吧 10/16 05:53
推 acidjazz: node1 /root/.ssh 的權限也可以檢查 10/17 22:25
→ bamchisu: 你會不會本來就是用key登入的,不是用password登入 10/21 11:08