-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ssh_timeout not working windows and wsl #87
Comments
Hi @todeb thanks for reaching out. Reading over your description it seems like you are having trouble connecting via ssh and not really having a problem with the If it is a connection/authentication issue have you tried using your private key for authentication? Packer does not read any keys automatically so they must be explicitly defined within the build template. Below is an example of how you would configure the null communicator.
If you are still running into issues after providing your private key can you please provide your debug logs which you can get by setting the environment variable |
But the problem here is that when packer tried to connect via SSH and handshake, the VM was still not ready. Install process did not finish. Even if the ssh_timeout was set to 30min packer just exit after ~5min. Configuration:
|
Got it, thanks for the log and updated description of the error. So Packer is able to connect to the SSH port of the running instance but it is failing the handshake. It looks like the timeout of 30m is superseded by the number of If you increase ssh_handshake_attempts to a really high value (e.g 200) is Packer able to eventually connect? |
yes, that works. Thank you. |
Hi @todeb thanks for the update. Glad that increasing the handshake attempts worked. I'm going to mark this as a bug as it is not immediately clear from the logged errors what is happening. I think we can improve the error messaging and documentation for these configuration options. |
I have the same issue. The workaround with increasing |
Same on an Ubuntu 18.04 host running Packer 1.8.0, it seems like |
Hello,
seems that "ssh_timeout" property is not working using packer on wsl2 and on windows.
I had set: ssh_timeout = "30m"
I had tried to find workaroud eg. setting:
ssh_proxy_host = "127.0.0.1"
then it waits 30min but it is not connecting.
I have ssh server running locally and I had added my public key to authorized keys. I'm able to ssh 127.0.01 without password.
Is there anything more that should i configure?
The text was updated successfully, but these errors were encountered: