I got a container that has openssh installed and can be connnected via the command
ssh 172.17.0.2
.
Now I want to get a port (say 32769) on the host side, and map the port 22 (of docker container) to it, the reason for doing that is I want to get the ssh 127.0.0.1 -p 32769
works on localhost, I got the errors as : ssh_exchange_identification: read: Connection reset by peer
. The port mapping is showing normally on docker engine: 0.0.0.0:32769->22/tcp
.
Can somebody help me with that? Much appreciated!