Copying files from one linux server to another via SSH

Ever wanted to copy files from one linux server to another, via SSH? Here’s the command: scp -P 22 -r /home/username/local-directory ip-or-hostname-of-remote-server:/home/username/remote-directory. scp = Secure Copy. -r = Recursive (copy the contents of the directory and the contents of any directories inside that directory). -P = (specifying the port number). 22 = The port number […]