[英]How to redirect Windows cmd output from local machine to remote file via ssh
How can I redirect Windows cmd output from a local (windows) machine to a remote machine and save the output as file via ssh. How can I redirect Windows cmd output from a local (windows) machine to a remote machine and save the output as file via ssh.
For example something like this: cmd /C "hostname | ssh user@host cat > remotefile.txt"
This is writing 'hostname' as text to remotefile.txt instead of the command output.例如像这样: cmd /C "hostname | ssh user@host cat > remotefile.txt"
这是将“主机名”作为文本写入 remotefile.txt 而不是命令 Z78E6221F6393D1356Z.81DB93
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.