<p>No, it uses an internal <a href="https://docs.docker.com/engine/api/v1.24/" rel="noreferrer">"attach protocol"</a> via the Docker daemon.</p>

CC BY-SA 3.0
2017-08-21T11:30:31.523Z
2017-08-21T11:30:31.523Z
Gaius
<p>If I run </p>

<pre><code>docker run -it ubuntu bash
</code></pre>

<p>Does it actually SSH into the container, or does it use another protocol?</p>

CC BY-SA 3.0
2017-08-21T11:24:44.657Z
No, there is no SSH involved. Docker uses a technology called namespaces to provide the isolated workspace called the container. https://docs.docker.com/engine/docker-overview/#namespaces
oryades
CC BY-SA 3.0
2017-08-21T13:45:14.807Z
@oryades you should think about turning this comment in an answer IMHO.
Tensibai
CC BY-SA 3.0
2017-08-21T15:38:37.227Z
As a side note in most cases you want to `docker run -it --rm ubuntu su -` rather than running bash. Running `su - ` simulates a full login and as a result, initialises some environment variables such as `TERM`.
Michaël Le Barbier
<docker><containers>
Does "docker run" actually SSH into the container?
Buvanesh Kumar
# Does "docker run" actually SSH into the container?

(Asked by: username_0 on 2017-08-21)

If I run 
docker run -it ubuntu bash

Does it actually SSH into the container, or does it use another protocol?

**Tags:** docker, containers

> **Comments:**
> **username_1**: No, there is no SSH involved. Docker uses a technology called namespaces to provide the isolated workspace called the container. https://docs.docker.com/engine/docker-overview/#namespaces  
> **username_2**: @username_1 you should think about turning this comment in an answer IMHO.  
> **username_3**: As a side note in most cases you want to `docker run -it --rm ubuntu su -` rather than running bash. Running `su - ` simulates a full login and as a result, initialises some environment variables such as `TERM`.  

---

## 1 answers

### Answer by username_4 on 2017-08-21. Score: 13 | Accepted answer

No, it uses an internal ["attach protocol"](https://docs.docker.com/engine/api/v1.24/) via the Docker daemon.


---

