I know many would say that this is a redundant question. But I am putting this thread as my last straw. I have gone through many threads in this community regarding my query, but was not able to achieve what I need.
Here's what I need to do.
Make docker containers such that it's IP would come in the same network as my host's. Just like a virtual machine in bridged network.
I need to be able to ssh to these dockers via external machines in my host m/c's network.
I simple replace Virtual Machines with docker in my system. And for that I need to ssh them just like I have been doing with the Virtual Machine nodes.
What I have tried?
Able to ssh the container via my host m/c. Where I installed ssh on container and enabled the port 22. Also I set UsePAM to no in /etc/ssh/sshd_config file.
Followed Ben Whaley on this thread.
I tried IP aliasing, But after all that, when I didssh <IP address> -p 5000
, I gotssh: connect to host <IP address> port 5000: Connection refused
error.Tried to follow Regan on this page. But those documents were pulled down, and The documents that I found was not helpful either, as they were proving hard for me to understand.
Tried to make a bridge from this reference. But there too, my virtual0 bridge was not taking any IP address. If I manually give one to it, it wasn't accepting any connection through that IP.
Please can anyone help me out here?
I just need to replace my VM's with the docker containers so that I can improve my resource utilization.