-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Windows users can't SSH into VM #35
Comments
Thanks for the feedback @nickshffer , it all helps to make the tools better for everyone. :) I believe this is related to the issue of running any SSH commands on Windows (#32 ) that is tough for me to test at the moment. It looks as if the SSH command fails to authenticate on your machine. It does though look like you can invoke an SSH client with All the commands involving docker (like I'd like at least some documentation on how to get around this on Windows, since on linux/OSX it comes with SSH. So, I'm looking for some OS-agnostic way to use SSH. It may be that the best way to do that is to launch a helper VM that has SSH installed, or go via the browser, or maybe even include an SSH client in the package for Windows users. Or perhaps just say its not supported for Windows, but that sucks a bit. |
Possible solution here #32 |
I'll follow up in #32 for the SSH issue but I'm curious if you have any insight into why port 8787 on the VM's IP is not accessible. What are the default firewall setting for the VMs created with the RStudio Server templates? If you don't know off hand I can SSH (with the browser) into one later and poke around. |
They should be on port 80 e.g. Via just the IP address in your browser. They are launched via docker with port 8787 mapped to 80. |
You can see the cloudconfig files that are used for the templates here https://github.com/cloudyr/googleComputeEngineR/tree/master/inst/cloudconfig |
Hi, Windows 8 user here. I've tried to use the SSH client that comes with RStudio and can be found in
Add the SSH keys to the instance:
This does get me past authentication:
But more complicated commands fail:
It seems like the forward slash in
Even though this does not return an error, the container never gets pushed. |
@chlorenz great feedback thanks! This is fixable then, great, will take a look. Although we can avoid SSH in most cases, it would be great to have the SSH option there for Windows too. |
@chlorenz Ok I've pushed a tiny fix that should sort out the forward slash issue. In case the > gce_push_registry(vm,
save_name = "my_test_container2",
container_name = "rstudio", wait = TRUE) If still no joy then log in via
If that fails you may need to auth with docker first before pushing:
And you can see in docker logs what may have errored in build:
|
Thanks @MarkEdmondson1234. Re the
Re the
So the error persists. An ugly patch would be to use
Then the following error is thrown:
So I poked around a little further. The directory does in fact not exist, but I can see you are calling
works, so my best guess is the directory is created initially but does not persist? If I understand this correctly, what this does is piping the output of ssh into the local folder and un-tarring it. This will lead to the issue that there is no |
Thanks for testing @chlorenz - pushed a small change so the file path should now work. The capture text issue is only used some SSH derived commands such as I will look around for the best way to tackle the piping on a Windows machine. |
Great, can confirm it works. |
Thanks @chlorenz :) - could you just try the |
Please correct me if I'm wrong here: There is a line missing in
(there might be a better way to do it).
(ignore for a second that I've changed
And indeed, it works!
As you can see the |
Hi there, Sorry about the red herring with the quotes, this was definitely a late night cognitive failure. I did one more modification to get fully Windows compatible paths:
After this the SSH command runs through. However, no output is stored 😄
does not fail but does also not store the output. Executing manually works fine.
|
Okay, so |
Thanks so much for testing this out, do you have a full example of using shell() ? I have an if statement for Windows users so can put anything in there that works. |
Hmm I can't even invoke |
@chlorenz ok I have moved everything to use |
@MarkEdmondson1234 Sorry to disappoint.
However
then |
@chlorenz can I check what version of R you are using? I can't find any reference to Run
|
@MarkEdmondson1234 I'm on the (almost) latest version of R
The help for
|
@chlorenz I really think this is finally sorted now, as I got a chance to debug it on a Windows machine. In the end it came down to just quoting the file names correctly, so both Windows and Linux now use system2 which is nice.
|
@MarkEdmondson1234 That's fantastic, I've just had a chance to test and can confirm it works.
|
Hi all, I've also been struggling with this issue while trying to set up a VM cluster using Here is how my
I've gone through all the suggestions both here and in #32, but am getting the following error message:
My session then hangs for several minutes until it times out, although it does creates the VM in my GCP Console. After doing some investigation with It tried running the same arguments through
This produced the following readout:
It seems to me that the problem has something to do with writing to the "hosts" file. Do you have any suggestion to resolve this? |
First: Great package. Really exciting stuff.
On a Windows 10 machine:
I'm having trouble accessing the VM created in either of the rstudio server templates (rstudio-hadleyverse and rstudio). After creating either one, I am able to SSH via the browser, SSH via gcloud, SSH via putty to the appropriate user@externalIP (after adding the appropriate keys and checking to make sure the public key is in both the project metadata store and on the VM's authorized keys list itself) but I cannot access RStudio server at port 8787 of the external ID nor can I run command like gce_push_registry
Public SSH key uploaded to instance Warning: Permanently added '104.197.245.222' (RSA) to the list of known hosts. Permission denied (publickey). Error: ssh failed ssh -o BatchMode=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=C:\Users\Nick\AppData\Local\Temp\RtmpU5tD1m/hosts -i C:\Users\Nick\.ssh\google_compute_engine.ppk [email protected] "docker commit rstudio gcr.io/sandbox-157602/my_rstudio" In addition: Warning message: running command 'ssh -o BatchMode=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=C:\Users\Nick\AppData\Local\Temp\RtmpU5tD1m/hosts -i C:\Users\Nick\.ssh\google_compute_engine.ppk [email protected] "docker commit rstudio gcr.io/sandbox-157602/my_rstudio"' had status 255
Similarly, as I'm sure you could guess, I cannot connect from the command line with simple commands like don't work (verbose output included)
C:\Users\Nick\AppData\Local\Google\Cloud SDK>ssh -vT -i C:\Users\Nick\.ssh\google_compute_engine.ppk [email protected] "echo foo" OpenSSH_7.3p1 Microsoft_Win32_port_with_VS, OpenSSL 1.0.2d 9 Jul 2015 debug1: Connecting to 104.197.245.222 [104.197.245.222] port 22. debug1: socket:460, io:00000257265B2EE0, fd:3 debug1: Connection established. debug1: permanently_set_uid: 0/0 debug1: open - handle:00000000000001D0, io:00000257265B3880, fd:4 debug1: close - io:00000257265B3880, type:2, fd:4, table_index:4 debug1: key_load_public: No such file or directory debug1: identity file C:\Users\Nick\.ssh\google_compute_engine.ppk type -1 debug1: open - CreateFile ERROR:2 debug1: key_load_public: No such file or directory debug1: identity file C:\Users\Nick\.ssh\google_compute_engine.ppk-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.3p1 Microsoft_Win32_port_with_VS Nov 29 2016 debug1: Remote protocol version 2.0, remote software version OpenSSH_7.3 debug1: match: OpenSSH_7.3 pat OpenSSH* compat 0x04000000 debug1: Authenticating to 104.197.245.222:22 as 'nickshffer' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: [email protected] debug1: kex: host key algorithm: rsa-sha2-512 debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ssh-rsa SHA256:7Tlsx+RlXnmXw8ldXRJ/8Rb6E1HCFpGtl8RqA/cO39Y debug1: Host '104.197.245.222' is known and matches the RSA host key. debug1: Found key in C:\Users\Nick/.ssh/known_hosts:1 debug1: rekey after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: rekey after 134217728 blocks debug1: SSH2_MSG_NEWKEYS received debug1: close - io:00000257265B3670, type:2, fd:4, table_index:4 debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512> debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Trying private key: C:\Users\Nick\.ssh\google_compute_engine.ppk debug1: open - handle:00000000000001D0, io:00000257265B3040, fd:4 debug1: close - io:00000257265B3040, type:2, fd:4, table_index:4 Enter passphrase for key 'C:\Users\Nick\.ssh\google_compute_engine.ppk': debug1: No more authentication methods to try. Permission denied (publickey).
Any thoughts?
The text was updated successfully, but these errors were encountered: