# How to use SFTP for Uploading & Downloading files

**SFTP (Secure File Transfer Protocol)** is a network protocol designed by the Internet Engineering Task Force (IETF) as an extension of the Secure Shell (SSH) protocol. It enables secure access, transfer, and management of files over a network. SFTP encrypts data, executes commands, and provides authentication to ensure secure file transfers. It works on **port 22** and uses the client-server model. SFTP is commonly used for secure file transfers over Transport Layer Security (TLS) and in virtual private network (**VPN**) applications. It offers advantages such as data security, encryption, public key authentication, large file transfer support, and integration with VPNs and firewalls.

Here are some steps to upload files using SFTP:

1. Use your SFTP client
2. Enter the command **sftp (username)@(data center)**
3. Enter your password
4. Choose a directory
5. Enter put (myfile)

**Uploading Files**

Open a terminal and connect to the SFTP server using the sftp\_user's name along with the another\_machine\_IP. Use the following commands:

**$ sftp root\@your\_IP\_ADD**

To navigate to the SFTP user's home directory.

```
sftp> put -r your_system_path another_system_path 
```

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FSxv0drpfiM1j95KCpuku%2Fimage.png?alt=media&#x26;token=8ae49624-8e41-4fdf-a015-5dccdaf2f154" alt=""><figcaption></figcaption></figure>

Downloading Files

```
sftp> get another_system_path  your_system_path 
```

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FW8HPyXKfKoR4fAn2ysEF%2Fimage.png?alt=media&#x26;token=1ed5e751-d50b-4642-b1d8-6519e5cadd50" alt=""><figcaption></figcaption></figure>
