Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

Here I am, poking around a remote server via SSH, and I want to find out about/read/edit/whatever a file. I don't like vi or other CMI stuff, I want to read it locally.

Is there any way I can download it without exiting my interactive SSH session? (Even better, would there be any way to run local commands without exiting it?)

share|improve this question

marked as duplicate by Evan Teitelman, Anthon, jasonwryan, slm, Gilles Jul 24 '13 at 22:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

You mean directly in the same terminal as the existing SSH session? – Ignacio Vazquez-Abrams Jul 24 '13 at 17:26
@IgnacioVazquez-Abrams: yes – Glycan Jul 24 '13 at 18:01
up vote 1 down vote accepted

You can use scp like scp file youruser@yourlocalmachine: .

Or you can use the -X parameter, will allow you to use window programas for example gedit.

share|improve this answer
I didn't know about the -X parameter. Also I didn't think of setting up a SSH server on my own box, that's an unexpectedly amusing idea. – Glycan Jul 24 '13 at 18:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.