简体   繁体   English

如何将远程 SSH 服务器上连续流的输出通过管道传输到本地程序

[英]How do I pipe output from a continuous stream on a remote SSH server into local program

I have a remote SSH Linux host producing a continuous stream of ADC data which I would like to analyze in real time on my local Linux host.我有一个远程 SSH Linux 主机,它产生连续的 ADC 数据流,我想在本地 Linux 主机上实时分析这些数据。 How do I best pipe the data into the program on my local host?如何最好地将数据通过管道传输到本地主机上的程序中? Thanks in advance for any tip.提前感谢您的任何提示。 H H

If I do for instance seq 1 1200000 |如果我做例如 seq 1 1200000 | ssh 192.168.1.4 myprogram ssh 192.168.1.4 我的程序
on the remote I get the data from seq into myprogram but this requires me to open a ssh terminal into the remote.在遥控器上,我将数据从 seq 获取到 myprogram 中,但这需要我打开一个 ssh 终端进入遥控器。 Now现在
ssh root@192.168.1.106 "seq 1 1200000 | ssh 192.168.1.4 myprogram" works, but for some reason it becomes much slower. ssh root@192.168.1.106 "seq 1 1200000 | ssh 192.168.1.4 myprogram" 有效,但由于某种原因它变得慢得多。 What is the best way?什么是最好的方法? H H

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何通过ssh关闭远程服务器而不出现“管道中断”错误? - How do I shutdown a remote server via ssh without getting a 'broken pipe' error? 如何通过 SSH 访问远程(远程服务器上的本地 gitlab 实例)存储库? - How do I access a remote (local gitlab instance on remote server) repository over SSH? 如何从Docker容器SSH到远程服务器 - How do I SSH from a Docker container to a remote server 如何从 Jenkins 对远程服务器执行 ssh - How to do ssh to remote server from Jenkins 如何编写CGI脚本以通过ssh执行远程脚本并显示来自远程执行的数据? - How do I program a CGI script to execute a remote script over ssh and display data from the remote execution? 登录远程ssh服务器时如何将文件复制到本地计算机 - How do I copy a file to local machine while logged in to remote ssh server 如何通过创建不通过SSH的目录将文件从本地服务器复制到远程服务器? - How can I copy file from local server to remote with creating directories which absent via SSH? 从 SSH session 到远程机器,如何在本地机器上打开 Vim Z21D6F40CFB51250A92E 上的文件 - From an SSH session to a remote machine, how do I open a file in a Vim session on my local machine 如何将数据发送到远程SSh服务器? - How do I send data to a remote SSh server? 远程 SSH Pipe 到本地文本编辑器 - Remote SSH Pipe to Local Text Editor
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM