Question: I'm trying to download a file from a linux server i'm already connected to.
I know you can use scp to connect to and pull down a file from a host, but that requires still being on local.
I could scp the file back to my local machine, but the local machine is not accessible from the host.

Is there a way to just pull down the file you are already looking at? Something like:

**From the host**

```
$ download <THEFILE>

```

This would really just be more convenient than having to go back out to my local terminal than scp the file. Instead you could just say "grab this one" Done.

I suppose the client would have to know what to do with the file. And i'm pretty sure "terminal.app" does not have a default downloads folder. So perhaps this is not possible.

BTW I'm connect from a mac to Debian.

Answer: 
Your machine hostname is not resolvable from the remote host. You should do this the other way round. From your local host:

```
scp xyz@remote:/home/user/test /home/user

```

Or the other way is to set up **remote port forwarding**, so you will be able to connect from your remote machine to your local host. Your command can look like this:

```
[local] $ ssh -R 2222:localhost:22 remote
[remote]$ scp -P 2222 /home/user/test xyz@localhost:/home/user

```

Inspired by my [answer on SO](https://stackoverflow.com/questions/33265944/scp-files-from-amazon-linux-machine-to-virtual-box/33266538#33266538)
If I understand your question, You are sitting in front of the mac and have a ssh into the debian. You see a file on the debian that you want on your mac.
You do not want to 'pull' the file from the debian to the mac because you must switch terminals.

**Use scp to 'push' the file from the debian terminal.**

```
scp /local/file/on/debian mac_user@mac:/downloads

```

/downloads on the mac must be accessible by the mac\_user