what i'd like to do is put the output from a command that continuously loops into a file on the same server i ssh into. for example i'm on server1 and ssh to server2
now if i do this,
ssh user@server2 echo "Hello" > /file.txt
then the file.txt is saved to server one and i want the output to stay on server2, and no, copying it over isn't an option as i'm really trying to get it to work with the nohup command.
As when the connection to the /dev/null is lost the process stops working as well, thats why i want the output to be going to the same server (server2) that i'm trying to get this command to run on.
not sure how to do it i did something like //servername/target but that didn't work at all
Anyideas, maybe just how to get the echo to output to the server2 when running the command on server2 would be a start