背景:
host.container。user@gmail.com.ssh从container到host,而不被提示输入user密码。问题:
在从容器成功连接到主机后的几分钟内user/.ssh/authorized_keys,Google 本身的某个进程会对其进行“修改”。据我了解,此过程附加了一些连接到 VM 所需的 ssh 密钥。但就我而言,该过程似乎覆盖了我从容器生成的密钥。
设置:
我连接到host使用 Google Compute Engine GUI,按下 SSH 按钮。
然后我按照AskUbuntu 上这个答案中描述的步骤进行操作。我为useron设置了密码host:
user@host:~$ sudo passwd user
Run Code Online (Sandbox Code Playgroud)
我设置PasswordAuthentication为yesin sshd_config,然后重新启动sshd:
user@host:~$ sudo nano /etc/ssh/sshd_config
user@host:~$ sudo systemctl restart sshd
Run Code Online (Sandbox Code Playgroud)
我使用 进入 Docker 容器bash,生成密钥,然后将其复制到主机上:
user@host:~$ docker exec …Run Code Online (Sandbox Code Playgroud) 我有一个看似简单的问题。希望这不是一个骗局,我一直在寻找,但我找不到任何特别相似的东西。
我有一张看起来像这样的表:
+------+----------+--------+--------+
| id | group_id | fruit | color |
|------+----------+--------+--------+
| 1 | 1 | apple | red |
| 2 | 1 | orange | orange |
| 3 | 1 | banana | yellow |
| 4 | 2 | kiwi | golden |
| 5 | 2 | banana | yellow |
| 6 | 3 | orange | orange |
| 7 | 3 | peach | orange |
| 8 | 3 …Run Code Online (Sandbox Code Playgroud)