# Two-container and authorized\_keys?

**URL:** https://meta.discourse.org/t/two-container-and-authorized-keys/352048
**Category:** Self-hosting
**Tags:** two-container
**Created:** [February 13, 2025, 8:36am UTC](https://meta.discourse.org/t/two-container-and-authorized-keys/352048 "2025-02-13T08:36:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [February 13, 2025, 8:36am UTC](https://meta.discourse.org/t/two-container-and-authorized-keys/352048/1 "2025-02-13T08:36:00Z")

</div>

In the end of `web_only.yml` is this line:

`awk -F\# '{print $1;}' ~/.ssh/authorized_keys | awk 'BEGIN { print "Authorized SSH keys for this container:"; } NF>=2 {print $NF;}'`

What is the meaning of it? I’m just wondering because I’ve never created any SSH-keys (and won’t until I have to rsync something between two VPS).

I get this:

`cannot open file '/root/.ssh/authorized_keys' for reading: No such file or directory`

That is a legit notice, because I don’t have that. But should I have? And if yes, how would ”SSH key for a container” differ from a server? Should I then treat that container as a independent server, create normally there SSH-key and use those normal way as one do between two servers?

Everything works just fine, though. But that bugs me because I don’t understand 😂

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 13, 2025, 10:25am UTC](https://meta.discourse.org/t/two-container-and-authorized-keys/352048/2 "2025-02-13T10:25:24Z")

</div>

You can delete that line. A long time ago it was convenient or required to ssh into a container instead of doing `docker exec` or `launcher enter`. I’ve never done it or seen anyone do it.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [March 15, 2025, 10:26am UTC](https://meta.discourse.org/t/two-container-and-authorized-keys/352048/3 "2025-03-15T10:26:15Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
