Ale*_*iev 12
在RCurl中直接支持ssh/scp:
x = scp("remote.ssh.host.com", "/home/dir/file.txt", "My.SCP.Passphrase", user="username")
Run Code Online (Sandbox Code Playgroud)
@JamesThompson 在Can R read from a file through an ssh connection 中的回答有什么问题?? (第二个代码示例使用用户名和密码)
请尝试以下操作:
> d <- read.table(pipe('ssh -l user remotehost "cat /path/to/your/file"'))
user@remotehost's password: # type password here
Run Code Online (Sandbox Code Playgroud)
ssh必须安装并在$PATH.
| 归档时间: |
|
| 查看次数: |
19027 次 |
| 最近记录: |