Read host keys from environment variables

Philipp Marek via openssh-unix-dev <[email protected]>
Newsgroups gmane.network.openssh.devel
Message-ID <[email protected]>
Hi everybody,

for use in containers it would be nice to pull SSH host keys from 
environment variables.

So, as an example, with an environment variable similar to

    HOST_KEY_RSA="-----BEGIN OPENSSH PRIVATE KEY----- b3Blbn…AwQF 
-----END OPENSSH PRIVATE KEY-----"

(general whitespace, so "\r\n\t " being allowed) I'd hope for an 
sshd_config saying

    HostKeyFromEnv HOST_KEY_RSA

being enough.


I saw "HostKeyAgent", but providing a unix-socket to a different 
container
running an agent with the keys is more complex and more likely to fail 
than
using environment variables.

sshd could even be so nice as to drop these variables from child 
processes,
although for my sftp usecase it shouldn't matter.


Thanks for any feedback!


Ph.

_______________________________________________
openssh-unix-dev mailing list
[email protected]
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.