How to redirect the output of a unix command from one server to another server.
I should be able to send the unix command's output from server-1. Then I should be able to receive the output in Server-2 and write it into a file.
How to redirect the output of a unix command from one server to another server. I should be able to send the unix command's output from server-1. Then I should be able to receive the output in Server-2 and write it into a file. |
||||
|
General, you can always do:
It saves output of In your case, on Server-1:
If two servers have no connectivity, but you can ssh to both servers, then from local machine, you can do:
|
|||||||||||||
|
You can run:
or use the output as an input for local command:
|
||||
|
Since you can't connect directly from server 1 to server 2 you can use this, having your local machine in the middle:
|
|||
|