2

I'm connected to a server via ssh -x and my only way to get text out of the system is the x clipboard (unless i want to take thousends of screenshots and OCR over it).

I can not execute any programs on the other machine, because i don't have access.

How can I achive this?

2
  • Are you sure that scp and/or sftp is disabled?
    – Johan
    Apr 28, 2010 at 5:18
  • I guess the only other way is not to use a clipboard but to rsync the file. I'm not pretending this is the ideal solution but neither are the other answers. Nov 14, 2017 at 23:25

2 Answers 2

6

Use xclip.

On the remote computer

xclip a_text_file_with_some_data.txt

On the local computer

xclip -o > test.txt

You did move the text via the clipboard, but not the "normal" way :)

2
  • my problem is that a propertiery "shell" (An X program) is my only way to access the data. I cannot execute other programs on the server. This "shell" stores data in the X clipboard. My problem is that i can't past it on my local Server. xclip -o test.txt outputs the clipboard of my own server.
    – Gupu User
    Apr 27, 2010 at 11:19
  • Nice. It works with stdin/stdout too. So what I'd do remotely is cat myfile.txt | xclip and locally on my Mac is xclip -o | pbcopy Nov 14, 2017 at 23:29
0

Many terminal emulators (PuTTY, gnome-terminal, Xterm) let you either:

  • log all terminal output to a file, or
  • set a really big scrollback buffer (01000 lines or so) and then copy all of it.
1
  • There is no output on the terminal i could copy. it is all inside an X-Window.
    – Gupu User
    Apr 27, 2010 at 11:20

You must log in to answer this question.