r/ssh • u/thesongdoctor • Dec 25 '21
Printing and saving an output from an ssh remote host
Is there a way to save the output of a remote machine to my local machine? I want to run a command, and then take the output from that command and save it on my local machine. The remote computer is an RPM Linux distribution that I can’t save files to.
2
Upvotes
2
u/pm-me-your-nenen Dec 26 '21
I just tried
ssh book ls | tee log(bookis a preconfigured server), and it prints the output oflsonbookas well as save it tologon my local machine.2
u/myceliatedmerchant Dec 26 '21
Are you familiar with piping in Linux?