Created
September 4, 2013 13:39
-
-
Save jianingy/6437064 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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