SSH-less file transfer

This commit is contained in:
lhark 2022-01-07 15:06:21 +01:00
parent 2a000a4ee1
commit 4ed0d886d3

15
how_to
View file

@ -948,6 +948,21 @@ ssh:
from server:
ssh -p 2222 <user>@127.0.0.1
Transfer files without using ssh/scp:
# Credits: @Chapoline, @britaliope
Server-side (untars in current directory):
# directory
nc -l -p 1234 | openssl enc -aes-256-cbc -d -iter 1000 | tar -xzf -
# file
nc -l -p 1234 | openssl enc -aes-256-cbc -d -iter 1000 | gunzip - > <file>
Client-side:
# directory
tar -zc <dir> -c | openssl enc -aes-256-cbc -e -iter 1000 | nc <ip> 1234 -q 1
# file
gzip <file> -c | openssl enc -aes-256-cbc -e -iter 1000 | nc <ip> 1234 -q 1
# Both need the same passphrase in stdin
Run MSVC on linux with Wine:
As seen on the internet, not tested:
https://hackernoon.com/a-c-hello-world-and-a-glass-of-wine-oh-my-263434c0b8ad