# Authenticity of host can't be established docker vs machine

**URL:** <https://discuss.circleci.com/t/authenticity-of-host-cant-be-established-docker-vs-machine/35225>\
**Category:** Build Environment\
**Tags:** docker, ssh, circle-yml\
**Created:** [April 1, 2020, 3:56pm UTC](https://discuss.circleci.com/t/authenticity-of-host-cant-be-established-docker-vs-machine/35225 "2020-04-01T15:56:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![erikvdven](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/erikvdven/32/24509_2.png) [@erikvdven](https://discuss.circleci.com/u/erikvdven)\
**Post date:** [April 1, 2020, 3:56pm UTC](https://discuss.circleci.com/t/authenticity-of-host-cant-be-established-docker-vs-machine/35225/1 "2020-04-01T15:56:55Z")

</div>

So the virtual machines don’t seem to have any problems with “add\_ssh\_keys”, but docker has.  
Until today I just used `machine: enabled: true` in my config.yml, but a VM is a bit overkill for me so I tried “downgrading” my setup to a small docker instance. Now with docker, my deployment is ruined. Worst of all, if I don’t cancel the deployment it just keeps running (and so keep using credits) till there is a time out after ten minutes or so:

```
The authenticity of host ' **************** (145.131.3.235)' can't be established.
ECDSA key fingerprint is xx:xx:xx:xx:xx......
Are you sure you want to continue connecting (yes/no)? 

```

I found a sort of hack, which works, over here [Known Hosts in Circle 2.0?](https://discuss.circleci.com/t/known-hosts-in-circle-2-0/18544), but is there any better solution out there?

Now my config looks something like this:

```
- add_ssh_keys:
          fingerprints:
            - "xx:xx:xx:xx:xx:xx:xx"
      - run:
          name: Keyscan mydomain.com (HACK)
          command: ssh-keyscan -H mydomain.com >> ~/.ssh/known_hosts
```
