Transferring files through SFTP using Raspberry Pi Terminal




Transferring files through SFTP using Raspberry Pi Terminal

Security has become one of the major concerns nowadays due to security breaching. When it comes to transferring files over the internet, the first thing that comes to our mind is whether it is safe or not. SFTP is one of the secure protocols to transfer the files over the internet. 

SFTP (Secure file transfer protocol) is a protocol to transfer or access the data over the Secure Shell (SSH) data stream thus providing security in an organization while transferring files.

One of the easiest ways is to transfer a file using software FileZilla that works on FTP. Simply download the software, connect to the server and select the file to be transferred and click on upload.

In this blog, we are going to see how to transfer a file from one Raspberry Pi to the other. There are various ways to transfer files like by uploading them on your drive and then download it from the drive to the other pi or by using software like Filezilla, etc. Here, we will learn how to transfer files using SFTP from the terminal.

In this tutorial, we’ll

download a file/directory from a remote Raspberry Pi Device,

upload file/directory to remote Raspberry Pi Device.

Downloading the file :

Step 1: Establish the connection with remote Raspberry Pi

sftp username@ipaddress 

Username - remote username of the server.

Ip address - IP of the server or you can also use a hostname.

If the username and hostname are correct it will ask for the password of the remote device.

Step 2: Download 

To download a file use get command with filename, as

get “filename”

To download a directory use “-r” recursive command, as

get -r “directory name”

Note: While downloading the file/directory change the file or directory name.

get -r “filename” “new_filename”

get -r “directory name” “new_directory name”

Uploading the file :

Step 1: Establish the connection with remote Raspberry Pi device.

sftp username@ipaddress 

Username - remote username of the server.

Ip address - IP of the server or you can also use a hostname.

If the username and hostname are correct it will ask for the password of the remote device.

Step 2: Upload

To upload a file, use put command with filename, as

put “filename”

To upload a directory, use “-r” as recursive uploading, as

put -r “directory name”

After the transfer of files is done disconnect from the remote server by using the commands 

“exit”  / “quit”  / “bye”

In this way, you can transfer a file/directory over the internet securely using commands.

We often ignore these simple tools and commands and download software. These simple commands can save us a lot of time. And next time when you are using the software, you already know how it works. Have fun with your Raspberry Pi Kits.



Author Biography.

SB Components
SB Components

SB Components Ltd is a specialist UK manufacturer of protective cases for single board computers and micro controller boards. The company is a team of tech enthusiasts whose dedication and sincerity results in top-notch and class products. Our designers are experts in producing robust, functional and elegant cases that protect and augment technology platforms.

Join Our Newsletter.

Subscribe to CrowdforThink newsletter to get daily update directly deliver into your inbox.

CrowdforJobs is an advanced hiring platform based on artificial intelligence, enabling recruiters to hire top talent effortlessly.

CrowdforJobs

CrowdforApps brings to you the well researched list of the most successful and finest App development companies, Web software developers.

CrowdforApps

CrowdforGeeks is where lifelong learners come to learn the skills they need, to land the jobs they want, to build the lives they deserve.

CrowdforGeeks

CrowdforThink is a leading Indian media and information platform, known for its end-to-end coverage of the Indian startup ecosystem.

CrowdforThink
CFT

News & Blogs

668170c13e4a1503c5840296c1b49277.jpg

Top Factors to Consider While Selecting an Idea...

In today's rapidly evolving digital landscape, cloud computing has become an essential compon...

df1b5a3d90c3ce92d52b58fd50a914a3.png

How to Build a SaaS on AWS: a deep dive into th...

Erecting a SaaS product is a complex task. There are numerous effects to consider, from the busin...

3ae4e984d0f3cdbe9e0985309cde10a9.png

Best Payment and Money-Sending Apps in 2023

What is the most efficient way to distribute a check or send cash to a partner or relative? Appli...

Top Authors

Lamia Rochdi is the Marketing Manager at Bell Flavors & Fragrances EMEA. A successful family-...

Lamia Rochdi

I’m Mertin Wilson a technician in a camera company and certified expert of different P...

Mertin Wilson

Zakariya has recently joined the PakWheels team as a Content Marketing Executive, shortly after g...

Zakariya Usman

Pankaj Singh is a Senior Digital Marketing Consultant with more than 2 years of experience in SEO...

Pankaj Singh
CFT

Our Client Says

WhatsApp Chat with Our Support Team