I routinely access remote files using nano in a terminal shell over ssh.

Sometimes I'd like to copy a large amount of text (sometimes one line sometimes a large block) and paste it into a local instance of gedit.

If the amount is small enough to see its easy enough to ctrl-c/ctrl-v or to select the text and right click or shift-ins (I forget which). But if the line is too long I'm out of luck.

1 Answer 1


You could always copy over the entire file using scp

scp remote-host-ip:~/path/to/file.txt ~/localfile.txt

Which works in a similar way to cp, copying the file in the first argument to the location provided in the second.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .