Skip to content

Instantly share code, notes, and snippets.

@jianingy
Created September 4, 2013 13:39
Show Gist options
  • Save jianingy/6437064 to your computer and use it in GitHub Desktop.
Save jianingy/6437064 to your computer and use it in GitHub Desktop.
from ubuntu:12.04
run apt-get install -y openssh-server sudo
run useradd -s /bin/bash -m jianingy
run gpasswd -a jianingy sudo
run sed -i '/%sudo/s/ALL$/NOPASSWD:ALL/g' /etc/sudoers
run dpkg-divert --local --rename --add /sbin/initctl
run ln -s /bin/true /sbin/initctl
run service ssh start
run mkdir -p /var/run/sshd
add authorized_keys /home/jianingy/.ssh/authorized_keys
expose 2222:22
cmd /usr/sbin/sshd -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment