Code-Memo

There are multiple ways to share files through SSH:

1. Using SCP (Secure Copy Protocol)

SCP is a straightforward method for copying files between hosts on a network.

Basic Syntax:

scp [options] [source] [destination]

Examples:

2. Using SFTP (SSH File Transfer Protocol)

SFTP is an interactive file transfer program that uses the SSH protocol. It is useful for transferring files and navigating remote directories.

Connect to Remote Server:

sftp username@remotehost

Common Commands:

3. Using RSYNC

RSYNC is a versatile tool for syncing files and directories between local and remote systems. It is efficient and can resume transfers.

Basic Syntax:

rsync [options] [source] [destination]

Examples:

4. Using SSHFS (SSH Filesystem)

SSHFS allows you to mount a remote filesystem over SSH, so you can interact with remote files as if they were local.

Installation:

Mount a Remote Directory:

sshfs username@remotehost:/path/to/remotedirectory /path/to/localmountpoint

Unmount the Directory:

fusermount -u /path/to/localmountpoint