News for hackers. Stuff that matters.
Re:A little SSH file copy magic at the command line by Tsiklon on Friday October 11, 2019 @01:08PM (#21226298)
If SCP/SFTP is not an option and you've got netcat installed on the target you can definitely perform some magic. now of course this does require you to log in on the destination though

~~ Receiving system `# nc -l -p $arbitraryPort > /path/to/file `

~~ Sending system `# cat /path/to/file | nc $receivingSystemIP -p $arbitraryPort `

eg: `# nc -l -p 9669 > /home/user/staging/httpd.conf ` `# cat /etc/httpd/httpd.conf | nc 10.50.50.1 -p 9669 `

This method is a useful feather to have in one's cap when used in combination with tar and Pipeviewer `pv`.

I've used this several times doing a backup of a large database and when I don't have enough space locally to hold the copy.

Re:A little SSH file copy magic at the command line by johnisgood on Friday October 11, 2019 @01:35PM (#21226562)
Note: you can do the opposite as well to achieve the same thing, e.g. listen on the "sending system", in which case when you connect, you get the file.