Comments (3)
I don't understand what you are asking. Can you please include example R code?
from ssh.
Sorry if I wasn't clear. What I want is to operate the remote data in EMR with Spark Shell.
Typically, I use xshell to connect to the EMR server, after connected, the to the prompt symbol is [user@ip]$
, here I can execute the linux command interactively. when I input command SCALAstart
(like input python
in windows cmd and enable python command) , it will be shift to the Spark shell with prompt symbol scala>
, and then I can input Scala code interactively, such as var i=1
.
When I used ssh package, it can connect to the server successfully.
library(ssh)
session<-ssh_connect("user@ip",keyfile="e:\\user.pem")
Then I can execute the linux command successfully.
ssh_exec_wait(session, command = "date")
But when I execute the start command of spark shell,
ssh_exec_wait(session,command="SCALAstart")
it start up successfully and end with the symbol scala>
wating for scala codes.
but I can not send new command to the server interactively. So, I guess it is because that the command ssh_exec_wait
is just waiting the end mark of command SCALAstar
(A red stop button is in top right conner of r studio consol window), and new command of Scala code is not allowed to input.
#invalid code after ssh_exec_wait(session,command="SCALAstart")
ssh_exec_wait(session, command = "var i=1")
var i=1
ssh_exec_wait(session, command = ":quit")
#in xshell, the codes below is valid after command: SCALAstart
var i=1
:quit
My question is "Can I input the scala code interactively during command SCALAstart
is not finished? " like xshell, running on the spark shell prompt scala>
, when SCALAstart
running on the linux prompt[user@ip]$
". (same as running python code under python prompt>>>
with "python interpreter command" is just running on windows CMD prompt>
. )
from ssh.
Currently you can only run scripts, there is no way to setup an interactive shell. I'm actually surprised SCALAstart
doesn't recognize that it is in a non-interactive shell and hence freezes waiting for user input. I'll open a new issue for this: #23 but I won't be able to look at it any time soon.
from ssh.
Related Issues (20)
- problem using scp on a complete folder tree
- Package installation onto Docker HOT 1
- SSH failing to open Known host file HOT 1
- ssh_tunnel to localhost.run
- Error when using scp_upload() & scp_download on some SFTPs
- SSH session automatically disconnects after parallel programming
- cannot scp_upload from Windows to Windows HOT 1
- cannot use wildcards with scp_download
- Problems wit large files with scp_download
- Make SSH tunnel to query a remote redshift database in R HOT 1
- switch user using sudo failing HOT 1
- ssh-agent not being found HOT 1
- Feature Request: `ssh_info()` works on disconnected sessions
- SSH_AUTH_METHOD_PASSWORD does not seem to be working
- scp_upload problem in newest verision HOT 1
- Could add function support SSH without password HOT 1
- How do I preserve the mode permission of a file with scp_upload HOT 1
- scp_upload and scp_download fail for UNC paths without permission on root directory
- Uploading large files using scp_upload() causes RStudio session crash
- Unable to connect from windows due to algorithm mismatch HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ssh.