حاويتان وملف authorized_keys؟

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 :joy:

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.

إعجاب واحد (1)

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