Skip to content

Instantly share code, notes, and snippets.

@rafaelrosafu
Created June 26, 2013 05:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rafaelrosafu/5865059 to your computer and use it in GitHub Desktop.
Save rafaelrosafu/5865059 to your computer and use it in GitHub Desktop.
Setup sshd on a docker image. You can't run daemons inside docker https://github.com/dotcloud/docker/issues/446#issuecomment-16710461, or at least not manually, looks like lxc-execute can do the trick http://lxc.sourceforge.net/man/lxc-execute.html
apt-get install openssh-server
mkdir /var/run/sshd
sed -i 's/#AuthorizedKeysFile/AuthorizedKeysFile/' /etc/ssh/sshd_config
# run as foreground process
/usr/sbin/sshd -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment