Issue
I need to connect to a remote linux machine via ssh, take the system information and write it to a file on the remote linux machine.
I've tried something like this:
ssh username@remoteip "cat /etc/os-release; hostname" > result.txt
It really takes information about the remote system, but writes it to a local file. How can I write this information to a remote file?
Solution
Pls use this, put the file path as remote PC path:
ssh username@remoteip "(cat /etc/os-release; hostname) > /home/remotePC/path/remote_result.txt"
Answered By - Ömer Sezer Answer Checked By - Cary Denson (WPSolving Admin)