Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
How do I wait for a new droplet to be ready for ssh using the API (DropletKit)?
I’m currently using the V2 API to spin up new droplets based on my own custom snapshot. When I run the droplets.create call via DropletKit it returns relatively quickly with the public ip.
The next step is for me to ssh into the machine and kick off a bash script. Unfortunately, I’m seeing ssh timeouts because the droplet is still powering on, which is causing my scripts to fail.
If I need to wait for a droplet to become accessible via SSH, what’s the recommended way of doing this?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×