How to setup SSH on Docker Container to access it remotely

Поделиться
HTML-код
  • Опубликовано: 22 авг 2024
  • Subscribe to my other channel for updated videos on TECH and PROGRAMMING:
    / @programmingwithumair321
    How to set up SSH on Docker Container to access it remotely. We Will be using the Debian image in docker. We are going to set up the SSH server, and then we will set up permissions for the user to access the container remotely.
    There are lots of use cases for setting up an SSH Server in a docker container. One of them would be doing remote development using a visual studio code, and you might also want to run a second operating system. The typical way to run it is by using a virtual machine which takes lots of resources, and I think the best way to run a separate operating system, especially Linux is by running that in docker.
    Support This Channel: paypal.me/tipa...
    ⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. I've been using Kite for 6 months, and I love it! www.kite.com/g...
    ⭐ ⭐ ⭐ ⭐ ⭐ Business Email: owaesmirza@gmail.com ⭐ ⭐ ⭐ ⭐ ⭐
    ⭐ ⭐ ⭐ ⭐ ⭐ Best Books for JavaScript: ⭐ ⭐ ⭐ ⭐ ⭐
    - Best JavaScript Book: amzn.to/3uvj37S
    - Best Book For Practise Projects: amzn.to/3uAqqv4
    - The best book for JavaScript Design Pattern: amzn.to/3dQZAI6
    - Angular Design Patterns: amzn.to/2PLxYMw
    - NodeJS Design Patterns: amzn.to/3t45Qmp
    ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ My Gear ⭐ ⭐ ⭐ ⭐ ⭐ ⭐
    Camera: amzn.to/3dR3Kjp
    Mic: amzn.to/3mysMaX
    Monitor: amzn.to/3d0XaHD
    ****************************************************
    Connect With Me:
    Twitter: / awaismirza01
    Facebook: / awaismirza01
    ************************************************
    Developer and Teaching Services Contact Details:
    Email: umairjameel321@gmail.com
    LinkedIn: / umair-jameel-24aa5368
    ************************************************

Комментарии • 32

  • @cybershelltech
    @cybershelltech 2 года назад +21

    After 50 years of looking for this, there is finally someone that actually helps

  • @Phil_D_Waller
    @Phil_D_Waller 18 дней назад

    brilliant! chatgpt was letting me down! you solved it!

  • @yashbhatt3815
    @yashbhatt3815 Год назад

    Thank you so much for this. Had this video saved in bookmark. As I was learning Docker back then. Now looking back onto this, I’ve reached so far. Have covered so much in life. Kubernetes, Terraform, certified all 3 major clouds and much more. ❤

  • @BenOgorek
    @BenOgorek Год назад +1

    At 2:30, it looks like the terminal equivalent to "Attach Shell" is "docker exec -it /bin/bash"

  • @kromodoro
    @kromodoro 4 месяца назад

    [Brazil]
    Thank you so much

  • @hema-val
    @hema-val 5 месяцев назад

    Thanks.. your video helped me.

  • @thayaganthusiyanthan9708
    @thayaganthusiyanthan9708 2 года назад

    Thanks you helped me alot. Can't wait for new videos.

  • @arduinoguru7233
    @arduinoguru7233 2 года назад +2

    BTW, you don't need to use VSC ,you can issue the command directly here:-
    sudo docker exec -t c437653487654c653328765b44567567567567434342323424c bash

    • @ramkunwarmeghwal5465
      @ramkunwarmeghwal5465 Год назад +1

      you can use only first four character of docker container id instance of all

  • @claire_brooks
    @claire_brooks 2 года назад

    From Notification squad, great video sir 👍

  • @Siyamthanda2
    @Siyamthanda2 10 месяцев назад

    Thank you so much

  • @artemushenko3333
    @artemushenko3333 11 месяцев назад

    Thanks it helped me !!🙏

  • @salimmzoughi3474
    @salimmzoughi3474 2 года назад

    Thank you so much .. you saved my life

  • @6stripsrainbow
    @6stripsrainbow 2 года назад +1

    Хорошее обучение. Спасибо большое! Хотелось бы теперь с docker-compose

  • @unlink1649
    @unlink1649 2 года назад +3

    Limited usefulness. You explain how to connect to a local container, but typically, containers run remotely, meaning you need a docker compose to set up ssh. There are 10000 tutorials who explain local container access with ssh, but barely any who go into the docker compose.

  • @wowwwww1993
    @wowwwww1993 Год назад

    I am a complete docker beginner, this video helped me to run a debian image on my OpenWRT-Setup. Thank you!
    Fail2Ban is missing, I would recommend to activate it.

  • @adityajawla723
    @adityajawla723 2 года назад

    Thanks for the tutorial.

  • @DanielSanchez-hv1hg
    @DanielSanchez-hv1hg 2 года назад

    Thank you so much!

  • @mojoma2
    @mojoma2 5 месяцев назад

    thank's

  • @kamaleshselvam2850
    @kamaleshselvam2850 2 месяца назад

    What if i want it to access from outside the local network using pulic ip . How can i achieve it if it is possible?

  • @jmmakwana3563
    @jmmakwana3563 2 года назад

    Heat boss 👌👌

  • @veereshpatel.46
    @veereshpatel.46 2 года назад

    Waiting for reactjs course

  • @drac8854
    @drac8854 6 месяцев назад

    How will i edit ssh>config file from dockerfile.

  • @touyaakira1866
    @touyaakira1866 Год назад

    I followed this but when I login ssh always gives an "Access denied" error I changed the password simply with the command "passwd root" the password is 1234 so I believe I did not type it wrong.
    What should I do, please help me

  • @yildiz12321
    @yildiz12321 2 года назад

    Thank you so much for sharing. I dont understand, I can connect with following your instructions but why I cant see any folder when I run ls command as you did ?

    • @yildiz12321
      @yildiz12321 2 года назад

      I found it because I'm connecting as in root directory, after cd .. commandI could saw the files

  • @herteert299
    @herteert299 Год назад +1

    Your method is not working

  • @zilog1
    @zilog1 Год назад +1

    ew a mac. get a real computer.

  • @EnchikO
    @EnchikO Год назад

    i get after "ssh root@localhost -p 80" error -> kex_exchange_identification: Connection closed by remote host.

    • @22CabbageDotCom
      @22CabbageDotCom Год назад

      Where did you get port 80 from? If you followed everything per the video, you should be using 2200, instead of 80. In the video, he talks about binding local port 2200 to port 22 (ssh server listens on) in the container. I hope this helps.

    • @BrawlStars-jd7jh
      @BrawlStars-jd7jh 2 месяца назад

      a little bit later her but, port 80 is reserved for http protocol, you shoud've chosen any free port above 1023