To make a long story short, I can PuTTY to an Azure VM, but Packer hangs at:
2018/05/04 20:03:15 packer: 2018/05/04 20:03:15 [INFO] Attempting SSH connection...
2018/05/04 20:03:15 packer: 2018/05/04 20:03:15 [DEBUG] reconnecting to TCP connection for SSH
2018/05/04 20:03:15 packer: 2018/05/04 20:03:15 [DEBUG] handshaking with SSH
2018/05/04 20:04:15 packer: 2018/05/04 20:04:15 [DEBUG] SSH handshake err: Timeout during SSH handshake
I have the "private_virtual_network_with_public_ip" attribute set to true, and verified that Packer is connecting to the public endpoint. I opened the network security group (NSG) to the world, and even tried removing it completely - which leaves the VM wide open. I also verified the network traffic flow with Azure's Network Watcher service.
I experienced this issue a couple days prior, and it was resolved by changing the virtual network address space. However, the address space was not clashing with any networks - at home, or at work. Even if there was an address clash, I would not be able to establish an SSH connection outside of Packer.
I am honestly stumped. Has someone else experienced this issue before?