SSH (Secured Shell)
Definition
SSH is stands for Secured Shell. It is a network protocol that is used to send the commands in a secure way to the host from the client.
On the SSH Server
For Debian-based system:
1 | sudo apt update |
On the SSH Client
1 | sudo apt update |
Test SSH Connection from Client
1 | ssh username@server_ip_address |
Transferring the files over SCP (Secured Copy Protocol)
Copy file from local to remote.
1 | scp /path/to/local/file username@remote_host:/path/to/remote/destination |
Copy file from remote to local.
1 | scp username@remote_host:/path/to/remote/file /path/to/local/destination |
Transferring the files over rsync (Remote Sync)
Copy file from local to remote.
1 | rsync -avz /path/to/local/file username@remote_host:/path/to/remote/destination |
Copy file from remote to local.
1 | rsync -avz username@remote_host:/path/to/remote/file /path/to/local/destination |
Options Breakdown
-a
: archive mode (preserves permissions, symbolic links, etc.)-v
: verbose-z
: compress file data during the transfer