Sign inSign up

nfntynl/nfnty-sshkeys

By nfntynl

Updated over 9 years ago

Image
1

1.7K

nfntynl/nfnty-sshkeys repository overview

Docker Docker Docker

nfnty-sshkeys

Adds a user public SSH key to the host's ~/.ssh/authorized_keys via docker container

Usage

docker run -v /root:/user -e AUTHORIZED_KEYS="`cat ~/.ssh/id_rsa.pub`" nfntynl/nfnty-sshkeys

With multiple keys:

docker run -v /root:/user -e AUTHORIZED_KEYS="`cat ~/.ssh/id_rsa1.pub`,`cat ~/.ssh/id_rsa2.pub`" nfntynl/nfnty-sshkeys

Adding the key to a specific user:

docker run -v /home/myuser:/user -e AUTHORIZED_KEYS="`cat ~/.ssh/id_rsa.pub`" nfntynl/nfnty-sshkeys

Usage

We recommend using this image as follows:

authorizedkeys:
  image: nfntynl/nfnty-sshkeys
  deployment_strategy: every_node
  autodestroy: always
  environment:
    - AUTHORIZED_KEYS=ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCjHJxGBGgPKfkPk6UDJB6ZK6COcGvJpVcXmptcRRN7qYE44Ei4KXLUGB6cgqkjFeEk2Z5HCSrC05NQgX1+blhAan+RfPtvuJzCaZPyVaJwezbspJi6UbjfV6wgJa8kNA819+ggDuKyjy7yA5KtJecxhKK5WfEbuwbDDVrl5ogQbm+Gj4ThK24rcjMoE3MSAcjj8oxIv0jg6jzzF55dOh2pKWkEo6gBZRrNlD+QQTdYRrmfu8vTGC8UYWPCGKEY5pvopF9kp24emM6zWio4RWOjIbC3nZrTyh5HgUXDN8bG/xeajKQAJBxtNI+/tP+cJDou73H9fK97MSD+pBETybON
  volumes:
    - /root:/user:rw

Tag summary

Content type

Image

Digest

Size

1.8 MB

Last updated

over 9 years ago

docker pull nfntynl/nfnty-sshkeys