Hello Everyone! I am facing some issues with Plumber API deployment in Digital Ocean via R. Given below is the R code I executed in my desktop (in RStudio) after making the following configurations..
- Created SSH key in my desktop(eg:via puTTYgen)
- Entered the public key content in my Digital Ocean account
library(plumber) library(analogsea) library(ssh) myExistingDroplets <- analogsea::droplets() do_provision(name="myNewDroplet")
Logs from console:
THIS ACTION COSTS YOU MONEY! Provisioning a new server for which you will get a bill from DigitalOcean. Using default ssh keys: PC NB: This costs $0.00744 / hour until you droplet_delete() it Waiting for create ........... New server key: <key> Error: Authentication with ssh server failed
The code line "analogsea::droplets()" opened a new window in my
browser to facilitate authentication and after
authentication, the code returned my existing droplet details from Digital
Ocean. That's a small win!
The code line "do_provision(name="myNewDroplet")" prompted me to
provide my Digital Ocean root password, then it created a new
droplet in my Digital Ocean account!, however it didn't
completely succeed (i assume), as it gave an error "Error:
Authentication with ssh server failed". And, I am unable to reach
this new server/droplet from my browser (on the port : 8000 which
plumber listen to)
One thing I am struggling to understand is, it printed out a New server key: (SSH Fingerprint) on the console which doesn't match with the SSH key pair I configured on my PC + Digital Ocean website (under settings -> ssh keys). I am not sure why would it create a new ssh server key as part of the droplet creation and why would it cause an authentication failure. my understanding is an ssh key needs to be created at the client(my PC) and the public key of that should be entered in Digital Ocean.
I appreciate if you can share any thoughts on the root cause for this error or if you think I missed out any steps in between..
Thanks in advance!