在 mrsdeploy 远程会话中无法访问 Linux shell
No access to Linux shell in an mrsdeploy remote session
我已使用 mrsdeploy::remoteLogin()
登录 Microsoft R 服务器
接下来我开始与 mrsdeploy::remoteCommandLine()
的远程会话
如果我尝试使用 system("pwd")
,我没有得到任何回应。
我猜对 shell 的访问被阻止了 - 有人知道这是在哪里控制的吗?
我们找到了这个问题的答案。
远程会话确实可以访问 shell。您需要使用 intern = TRUE
才能看到结果。
例如system("pwd", intern = TRUE)
我已使用 mrsdeploy::remoteLogin()
接下来我开始与 mrsdeploy::remoteCommandLine()
如果我尝试使用 system("pwd")
,我没有得到任何回应。
我猜对 shell 的访问被阻止了 - 有人知道这是在哪里控制的吗?
我们找到了这个问题的答案。
远程会话确实可以访问 shell。您需要使用 intern = TRUE
才能看到结果。
例如system("pwd", intern = TRUE)