SSH implementation comes with an SCP utility for remote file transfer that, by default, uses the SSH protocol.
SCP (secure copy) is a command-line utility that allows you to copy files and directories between two hosts securely. We can copy our files from local to remote servers and from remote servers to our local machine.
SCP is very similar to copy or cp, but instead of providing a local path, we need to specify a username, the remote IP address or DNS name, and the user's credentials.
sudo systemctl enable ssh
sudo systemctl start ssh #Starting SSH Server
netstat -lnpt #Checking for SSH Listening Port
Now we can begin transferring files. We need to specify the IP address of our Pwnbox and the username and password
scp plaintext@192.168.49.128:/root/myroot.txt .
<aside> 🗒️
You can create a temporary user account for file transfers and avoid using your primary credentials or keys on a remote computer.
</aside>