top of page
limatamulripa

Rstudio Keygen: Best Practices and Tips for Generating and Using Secret Keys



To answer my own question, I did not need to change the location of the executable in git bash. I just needed to run ssh-keygen in the git bash terminal window within RStudio to create a separate SSH key for that version of git and register it on github.com.


On our RStudio server users are unable to generate SSH RSA keys, either using Tools > Global Options > Git/SVN > Create RSA Key... or within the Terminal or using something like system("ssh-keygen -f id_rsa -t rsa -N ''") within the R console. It will always say Permission Denied. I've tested this with network/ldap users with NFS home directories and with local accounts with local homes. If I login to the server directly I'm able to run the same bash commands to generate the keys successfully. Is this a bug? Any troubleshooting tips?




Rstudio Keygen




Very interesting! Thanks for the command output! There are definitely some differences to PATH and probably other environment variables, which suggests some differences in startup. It's also interesting to see identical output from id, which and ssh-keygen, which means that you can execute the executable in both contexts. As a result, my suggestion would be to focus on the options you are using with ssh-keygen and what ssh-keygen is trying to do (i.e. are defaults different and is it trying to write to a different place from bash / terminal? You could be getting "Permission denied" from trying to write to a place that you do not have permission to do so.


I.e. you could try ssh-keygen without parameters and see what happens? And then slowly add parameters and see what breaks things? If you can share the full output of a failing command, that might be helpful as well (not sure if there is a way to increase verbosity or gather more SSH client logs). If it fails trying to create a certain file, do a ls -lha /path/to/file to see what permissions are on that file.


In fact, I can run ssh-keygen to create the ssh key in /tmp or anywhere outside of my NFS home where I have permissions to write. Obviously writing to /tmp wouldn't be a very secure thing to recommend for our users. Normally I'd chalk this up to permission quirks on our NFS space except for the fact that the same commands work when run outside of the RStudio environment.


We're also running JupyterHub with a very similar setup and it appears Jupyter, within a bash shell or R notebook, has the same issue running ssh-keygen. Could it be related to the way these processes are demonized and spawning user processes? I checked the SELinux logs and didn't find anything there.


In my opinion, we have entered the realm of weird linux wizardry that I do not understand. One final check would be to execute R in a normal bash shell and see if you can execute ssh-keygen there. If it works, it would very nicely point to the problem being something related to daemonized processes and not necessarily a problem with R.


Once you have the OpenSSH Client installed, you must open the terminal and enter the command ssh-keygen. After doing so, it will ask us to enter a folder, although pressing enter will create the default folder.


A: You can verify the fingerprint of the public key uploaded with the one displayed in your profile through the following ssh-keygen command run against your public key usingthe bash command line. You'll need to change the path and the public key filename if you aren't using the defaults.


To create a key pair for secure shell (SSH) Public Key authentication by using the ssh-keygen utility, complete the following procedure:Note: Consider using a longer key such as 2048 bit for additional security.


Run the following command: ssh-keygen -t rsa -C In the preceding command, the comment, -C, field is optional. However, you must provide an e-mail address to ensure that other administrators can identify the public key.


A zip file may be downloaded instead of the self-extracting installer. Download and extract the .zip to any location. RStudio may then be run directly from that location via rstudio.exe (in the bin folder). 2ff7e9595c


0 views0 comments

Recent Posts

See All

Baixe o GTA 5 ISO file 7z APK no MediaFire

GTA 5 ISO File 7z APK: Como Baixar e Jogar no Android Se você é um fã da série Grand Theft Auto (GTA), deve estar se perguntando se pode...

Comments


bottom of page