Sample Header Ad - 728x90

How can I save the output of tail to my clipboard or somewhere on a SSH session where there is only a unidirectional connection and server is limited?

0 votes
0 answers
514 views
I have to report some logs from some of the servers in our infrastructure which I have limited permissions on. Every time I copy 1000 lines of logs and paste it into Slack, I can't do scp from the server to my local computer. I can only scp from my local and grab a file and paste it in a directory on my laptop. I cannot install any packages on this server as I have no permission like that. The command I'm using is this: tail -n 1000 ./mylogfile.log My process is this: 1. SSH into server 2. Run that tail command 2. Copy 1000 lines of code 3. Paste and report it in Slack What I want to achieve: 1. Run that command 2. Somehow get that log file on my local system as a file or in my clipboard (preferred), which is hard because of limitations I have My limitations are: 1. I can only see this server through VPN, the server can't see me, and I can't do SCP from the server. 2. I can't install any new packages In summary, I want to get that 1000 lines of log through an easy clean way without copying despite the limitations I have. Thank you everyone.
Asked by Ilgar (3 rep)
Mar 4, 2024, 11:33 AM
Last activity: Mar 15, 2024, 10:29 AM