[R-SIG-Mac] set up a ssh tunnel in a R script
dpeeter1 at ulb.ac.be
Fri Feb 22 12:56:11 CET 2013
I'm very frequently reading data from a MySQL server to which I connect thru a ssh tunnel, in R dataframes. The connection to MySQL thru ssh is trivial with clients like Sequel pro but I would like to do this as well directly with R, without opening the tunnel in a terminal before to launch the script. The problem is that I would like some colleagues of mine (working on windows pc's, even putty is too difficult) to use my R scripts and it would be really easier for them not to have to care about this ssh command. So my question is : is there a way to put the ssh command into the R script ? And secondly how to give the password ?
I've tried with system() but I get an error like "pseudo terminal will not be allocated ..."
I haven't found any solution so far in the R documentation nor on the forums.
Any ideas ?
More information about the R-SIG-Mac