π€ Uploading/Sending a Directory from Local to SSH Server
Use either of the following commands:
scp -P 22 -r ./shell/* [email protected]:/home/gnu/shell/
OR
scp -r -P 22 ./shell [email protected]:/home/gnu/shell/
π₯ Downloading/Receiving a Directory from SSH Server to Local
scp -P 22 -r [email protected]:/home/gnu/* ./gnu/
OR
scp -r -P 22 [email protected]:/home/gnu ./gnu/
π€ Uploading/Sending a File from Local to SSH Server
scp -P 22 ./shell.php [email protected]:/home/gnu/shell.php
π₯ Downloading/Receiving a File from SSH Server to Local
scp -P 22 [email protected]:/home/gnu/flag.txt ./flag.txt
π Note:
-P 22: Specifies the SSH port (22 by default)-r: Recursively copy entire directories- Replace
192.168.0.20with the target server’s IP- Replace
u0_a418with the correct SSH username