In this article, we’ll show you how to use SSH and SFTP into your Pi, execute commands, and transfer files. We’ll assume that your Raspberry Pi is on the same network as the computer you’re using to connect to it.

What Is SSH?

SSH stands for Secure Shell. It’s a standard network protocol that gives you a secure way to send text back and forth between your Pi and the computer you’re using to remotely connect to your Pi. You’ll use the SSH protocol for all kinds of things like entering your password to log into your Pi and executing commands.  SSH was designed as a replacement for Telnet, which sends commands in plain text over the network. In contrast, SSH encrypts those commands. Any network service can use SSH, which operates over TCP port 22. 

What Is SFTP?

SFTP is short for Secure File Transfer Protocol. SFTP is a fast and convenient way to transfer files between your Pi and another computer on your network. SFTP is more secure than FTP because, just like with SSH, all your data is encrypted while it’s traveling from one computer to another.  You don’t want all your data to be transferred in plain text, do you? Certainly not! Stay safe, kids.

How to SSH Into a Raspberry Pi

We’ll start with how to use SSH to connect to your Raspberry Pi from a Windows PC on your network using PuTTY. PuTTY is one of several SSH clients that are freely available. We like PuTTY because it’s open source software that’s completely developed and supported by a team of volunteers. You can use whatever SSH client you want. Just be sure to download and install it before you begin. You are now connected to your Pi via SSH and can use the terminal to execute commands. If you haven’t changed your Pi’s default password yet, this is a great time to do that. Since SSH is enabled, if your Raspberry Pi is using the default password, it would be very easy for someone to break in!

How to SFTP Into a Raspberry Pi

Above, we walked you through how to use an SSH client to securely connect to a Pi on your network and execute commands. For transferring files, we’ll use an SFTP client. Technically, it is possible to transfer files with PuTTY, but it’s cumbersome. It’s much nicer to have a file browser you can use to move files in bulk when you need to. FileZilla is a popular FTP client that supports SFTP. If you can connect with SSH, then you can connect with SFTP as well. Convenient, isn’t it? Prepare by downloading and installing FileZilla or your SFTP client of choice on the computer you’re using to remotely connect to your Pi. WinSCP is another popular SFTP client. Remember, you don’t need an SFTP server, just an SFTP client. Pro Tip: If you install FileZilla, watch out for when it asks you to install McAfee and WinZip. Select Decline if you don’t want to install those programs on your computer. If, for example, you wanted to copy a file from your local computer to your Pi, you’d navigate to the source folder on the left and the destination folder on the right. FileZilla’s file manager allows you to drag and drop files between local and remote sites. 

Finding Pi Projects

Once you get comfortable with executing commands and transferring files to and from your Pi, you’ll start to realize just how many different ways you can put your Pi to work. Don’t give in to analysis paralysis, though—just pick a project and dive in! It really is the best way to learn.

How to SSH or SFTP Into Your Raspberry Pi - 71How to SSH or SFTP Into Your Raspberry Pi - 38How to SSH or SFTP Into Your Raspberry Pi - 98How to SSH or SFTP Into Your Raspberry Pi - 42How to SSH or SFTP Into Your Raspberry Pi - 56How to SSH or SFTP Into Your Raspberry Pi - 47How to SSH or SFTP Into Your Raspberry Pi - 15How to SSH or SFTP Into Your Raspberry Pi - 90How to SSH or SFTP Into Your Raspberry Pi - 72How to SSH or SFTP Into Your Raspberry Pi - 86