Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save brettviren/4a36b1fddf3fdb838d94991f776f3a7f to your computer and use it in GitHub Desktop.
Save brettviren/4a36b1fddf3fdb838d94991f776f3a7f to your computer and use it in GitHub Desktop.
❯ docker run -p 2222:22 -ti dunedaq/sl7
[root@29a0d8d71d90 /]# vi /etc/ssh/sshd_config
[root@29a0d8d71d90 /]# ssh-keygen -A
[root@29a0d8d71d90 /]# /usr/sbin/sshd -D &
[root@29a0d8d71d90 /]# mkdir /root/.ssh
[root@29a0d8d71d90 /]# chmod 700 /root/.ssh
[root@29a0d8d71d90 /]# cat >> /root/.ssh/authorized_keys
# paste, ctrl-d
[root@29a0d8d71d90 /]# chmod 600 /root/.ssh/authorized_keys
❯ ssh root@localhost -p 2222
[root@29a0d8d71d90 ~]#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment