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
************************************************
After 50 years of looking for this, there is finally someone that actually helps
brilliant! chatgpt was letting me down! you solved it!
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. ❤
At 2:30, it looks like the terminal equivalent to "Attach Shell" is "docker exec -it /bin/bash"
[Brazil]
Thank you so much
Thanks.. your video helped me.
Thanks you helped me alot. Can't wait for new videos.
BTW, you don't need to use VSC ,you can issue the command directly here:-
sudo docker exec -t c437653487654c653328765b44567567567567434342323424c bash
you can use only first four character of docker container id instance of all
From Notification squad, great video sir 👍
Thank you so much
Thanks it helped me !!🙏
Thank you so much .. you saved my life
Хорошее обучение. Спасибо большое! Хотелось бы теперь с docker-compose
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.
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.
Thanks for the tutorial.
Thank you so much!
thank's
What if i want it to access from outside the local network using pulic ip . How can i achieve it if it is possible?
Heat boss 👌👌
Waiting for reactjs course
How will i edit ssh>config file from dockerfile.
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
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 ?
I found it because I'm connecting as in root directory, after cd .. commandI could saw the files
Your method is not working
ew a mac. get a real computer.
lol
i get after "ssh root@localhost -p 80" error -> kex_exchange_identification: Connection closed by remote host.
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.
a little bit later her but, port 80 is reserved for http protocol, you shoud've chosen any free port above 1023