News for hackers. Stuff that matters.
Re:Termbin: Easiest way to copy over SSH by jonathonf on Tuesday January 31, 2017 @05:48AM (#13529440)
What's the best way of scp'ing from a remote server connection to local machine, if the local machine isn't externally accessible (e.g. isn't running SSH)?

e.g.

    local$ ssh remote
    remote$ # do some stuff
    remote$ echo "Text" > file.txt
    remote$ # oh, I need to copy file.txt back to my local host
    remote$ #?
Re:Termbin: Easiest way to copy over SSH by lutusp on Tuesday January 31, 2017 @11:51AM (#13532350)
> What's the best way of scp'ing from a remote server connection to local machine, if the local machine isn't externally accessible (e.g. isn't running SSH)?

If by "not externally accessible" you mean the local machine is not running an SSH server, but has an SSH client available and the machine is connected to the network, and the remote machine is running an SSH server, then:

$ scp remoteuser@remotehost:remotepath/remotefile localfile

Re:Termbin: Easiest way to copy over SSH by throwaway2016a on Tuesday January 31, 2017 @09:24AM (#13530732)
If you can't do what another poster suggested and do the transfer the other way around... uploading the file to AWS S3 from the CLI works pretty well. Though unlike the solution in this post does require installing heavier software.

Also, alternatively... pipe it to `mail` and send it over email.

Re:Termbin: Easiest way to copy over SSH by yorwba on Tuesday January 31, 2017 @05:53AM (#13529476)
I would use

    local$ scp user@remote:/path/to/file.txt local_file.txt
If your local machine is not externally accessible, you have to initiate the access on it.
Re:Termbin: Easiest way to copy over SSH by 013 on Tuesday January 31, 2017 @05:53AM (#13529475)

  local$ scp remote:~/file.txt ./