Closed studerus closed 6 years ago
Do you have SSH keys set up already on your machine? And you can ssh into a DO box?
How can I check whether I have SSH keys correctly set up? It appears that I have SSH keys because typing keys()
shows two different keys.
It would be very helpful if either the vignette or the help file docklet_rstudio()
would explain how to use SSH keys for creating an RStudio server.
How can I check whether I have SSH keys correctly set up?
if you can ssh into your DigitalOcean machine from the command line outside of R, then I think everything should work fine in analogsea
in R - can you do that?
It would be very helpful if either the vignette or the help file
docklet_rstudio()
would explain how to use SSH keys for creating an RStudio server.
Will definitely add more to the docs on using ssh keys
Note there's a slight problem too when creating docklet's where they aren't actually all the way up even when we think they are https://github.com/sckott/analogsea/issues/113 - working on fixing that - solution being just creating the droplet with docklet_create()
- then check again with droplets()
until is says status active, then you can go ahead and do things with it
to be sure, you did create a docker droplet via docklet_create()
?
Sorry, I'm not familiar with using ssh on the command line. Do you have an example command that I could adapt for my needs?
Do you have an example command that I could adapt for my needs?
e.g., ssh -i .ssh/id_rsa2 root@<IP Address>
46.101.209.177
the one you had above in your error messageroot
is the user name - so if you chose a different user name, use that, but most likely it is root
-i
is a flag to pass in your ssh key and the .ssh/id_rsa2
is the path to my ssh keyNote: I don't know much about where windows ssh keys are stored
Using ssh on the command line seems to have worked, because it says "Welcome to Ubuntu 14.04 ..." at the end. However, it also said before "Could not create directory './home/erich/.ssh'". The authenticity of host ... could not be established. It also said "Failed to add the host to the list of known hosts (...)"
I created the ssh key pair with RStudio under Global Options - Git/SVN. It's stored in C:/Users/erich/.ssh/id_rsa by default
Note there's a slight problem too when creating docklet's where they aren't actually all the way up even when we think they are #113 - working on fixing that - solution being just creating the droplet with docklet_create() - then check again with droplets() until is says status active, then you can go ahead and do things with it to be sure, you did create a docker droplet via docklet_create()
I tried that. Unfortunately, It did not help.
Thanks for the info. Do you have your ssh keys stored in options? what does getOption("do_ssh_keys")
give you? We look for that R option and use the key you set as your default
No, I didn't have stored it in options, but I tried it out now. Unfortunately, it still didn't work.
Okay, i'll have to test on a windows VM, and get back to you ... :clock1030:
Pro-top for others who might have Googled their way here: remember that if you're using RStudio Server, you are technically trying to SSH from your server, not from your desktop. So make sure your SSH keys are setup to work when using the remote server, not your desktop.
Wasted a few more minutes on that than I'd like to confess.
Thanks, but isn't the problem here that ssh keys on desktop and server are not configured correctly (which I think doesn't have anything to do with rstudio server)?
Sorry, my point was that I had the keys working swimmingly on my desktop and usually use RStudio Desktop. So I was puzzled when I could SSH in from the command line but analogsea could never SSH in to the droplet.
Of course, once I get the SSH keys setup on the server and confirmed that I could SSH into the droplet from the server, then the analogsea commands running in RStudio Server started working.
I'm working on windows 10 with the latest version of R and analogsea from github. Creating and manipulating droplets works fine, but I cannot create an RStudio or shiny server. Running the following command:
results in the following error message:
Is this a bug or am I doing something wrong?