Closed DockerNewbee closed 3 years ago
It's important to pass the flag -p 41061:22
to the docker run
command. I have no idea how to achieve that in kitematics. Try looking up port mapping and make sure port 22 (of the container) is mapped to port 41061 (of your machine).
From kitematic if we want to execute any code for that container it will open in windows powershell where i am trying to execute as below.
Bad port '41061:22'
ssh: connect to host localhost port 40161: Cannot assign requested address #
and yes the port 41061 is mapped to port 22
Are you using windows? I think Docker on windows works in a way that containers run inside a Linux VM, so the requested IP cannot be localhost. You can try using different IP address, but I'm not sure it'll work.
I'm closing this issue since it received no activity in a long time. Should this issue be up-to-date, feel free to re-open it. Thank you.
Hi,
I am very new to docker and i am trying to connect through ssh. But it is throwing me an issue:
I might be doing something wrong here, if you can guide me it would be really helpful.
After running the image, i am trying to access the ssh using container in kitematics
issue is as below
ssh root@localhost -p 41061
ssh: connect to host localhost port 41061: Cannot assign requested address #