# Packer tries to connect over ssh and gives up

**URL:** <https://discuss.hashicorp.com/t/packer-tries-to-connect-over-ssh-and-gives-up/44919>\
**Category:** Packer\
**Tags:** vsphere\
**Created:** [September 28, 2022, 11:54pm UTC](https://discuss.hashicorp.com/t/packer-tries-to-connect-over-ssh-and-gives-up/44919 "2022-09-28T23:54:30Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![lethargosapatheia](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/lethargosapatheia/32/13120_2.png) [@lethargosapatheia](https://discuss.hashicorp.com/u/lethargosapatheia)\
**Post date:** [September 29, 2022, 12:22am UTC](https://discuss.hashicorp.com/t/packer-tries-to-connect-over-ssh-and-gives-up/44919/2 "2022-09-29T00:22:40Z")

</div>

Inspired by this thread [Packer connecting to Ubuntu "too early", how to enforce a delay?](https://discuss.hashicorp.com/t/packer-connecting-to-ubuntu-too-early-how-to-enforce-a-delay/31067) I was able to make it work by stopping the ssh service altogether through `early-commands` in `autoinstall`:

```auto
early-commands:
  systemctl stop ssh

```

---

_[View the full topic](https://discuss.hashicorp.com/t/packer-tries-to-connect-over-ssh-and-gives-up/44919)._
