Sign inSign up

uisleandro/ssh

By uisleandro

•Updated over 8 years ago

tags: debian-v8.10, alpine-v3.7

Image
0

1.9K

uisleandro/ssh repository overview

⁠Tags:

  • debian-v8.10
  • alpine-v3.7

⁠How to run it:

  1. You should make a run.sh file and put the following content:

    docker run --rm -p 8022:22 \
    --name deb-ssh \
    uisleandro/ssh:debian-v8.10
    
  2. After you must run:

    echo "" > id_rsa && \
    docker exec deb-ssh cat /root/.ssh/id_rsa >> id_rsa
    
  3. At this point you must have a private key which will give you access to the container, if you are using linux you can try the following command:

    ssh-keygen -f "/home/$USER/.ssh/known_hosts" -R [127.0.0.1]:8022 && \
    ssh [email protected] -v -p 8022 -i id_rsa
    
  4. If you want to change the current private-key to another one you must run, (from outside the container) and then run the 2nd and 3rd steps:

    docker exec deb-ssh ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa
    docker exec deb-ssh cat /root/.ssh/id_rsa.pub > /root/.ssh/authorized_keys
    

⁠What is inside?

  • vim
  • openssh-server
  • supervisor

Tag summary

Content type

Image

Digest

Size

24 MB

Last updated

over 8 years ago

docker pull uisleandro/ssh