To solve this problem I always have to use scp or rsync to copy the file into my local computer to open the file and simply copy the contents of the text file into my local clipboard. I was just wondering if there is a more clever way to do this without having the need of copying the file.
How to copy file contents to the local clipboard from a file in a remote machine over ssh
ssh;clipboard
Of course you have to read the file, but you couldssh USER@REMOTE cat file | xclip -iof that still means to open a ssh connection and copy the contents of the file. But finally you don't see anything of it anymore ;)And if you are connecting from an OS X computer you use pbcopy instead:ssh USER@REMOTE cat file | pbcopy