Connecting with SCP and SFTP

With the rise of security risks on Websites that process credit cards, some PCI compliance companies, like Trustwave are requiring FTP to be shut off and a different method of uploading and downloading files be used. In order to accommodate these PCI compliance requirements, you can use SFTP or SCP to copy files from your local computer to your server.

What is SFTP and SCP?

SFTP is SSH File Transfer Protocol, Secure File Transfer Protocol, or Secure FTP. An SFTP connection uses port 22 through the command line or another SFTP client. SFTP connects securely so the data is encrypted over the network. You can restrict certain IP addresses and allow certain IP addresses making the SSH port 22 open only to specific users.

SCP is Secure copy based off of the Secure Shell Protocol (SSH). SCP is a Secure connection over port 22 that allows only certain IP addresses to access the server the same as SFTP.

Why would I want to use SCP and SFTP?

If you are running a website that requires credit card payment transactions, you will need to follow PCI compliance standards. This is to ensure that the site will not be compromised by hackers trying to steal personal information. Website owners run PCI compliance scans on their server to find any potential risks to website attacks. When the server fails to pass the PCI scan due to FTP port 21 being open, the web developer is forced to use a different method to upload and download files from the server. This is where SCP and SFTP come in. SFTP and SCP allow the developer to connect to your server on a secure connection.

How do I connect / use SCP and SFTP?

You can use SSH Secure Shell, PuTTy, FileZilla or another program to connect to your server using SFTP. WinSCP can connect to your server using SCP protocol. You can even use some HTML editors to connect with SFTP like DreamWeaver.

Connecting with SFTP with FileZilla

  1. Open FileZilla.
  2. Click the site manager button at the top right of the FileZilla client.
  3. Conecting SFTP with FileZilla

    Set your connection to the following settings.

    Host: Port: 22 Protocol: SFTP (SSH File transfer Protocol) Logon  type: Normal User: The cPanel username Password: The cPanel password Account: Leave blank

    Important! You must have your local IP address added to your server Firewall through the WHM.

Connecting with SCP with WinSCP

  1. Open WinSCP.
  2. Connecting with SCP WinSCP

    Set your connection to the following settings.

    Host name: Port number: 22 File Protocol: SCP  User name: The cPanel username Password: cPanel password

    Important! You must have your local IP address added to your server Firewall through the WHM.


  • Just a note – if you are using a private/public key and have switched off password login for SSH, you can’t use SFTP. You can use standard FTP and set the encryption to Use: Require explicit FTP over TLS.

  • I’ve tried with FireFTP and Filezilla.

    On FireFTP : Authentication failed

    On FileZilla : No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic).

    So, there is no way to connect with SFTP, please can you help? Thanks

    • This may depend on the kind of account you have. If you are using a shared account, you’ll want to make sure you have SSH access. If you are in a VPS/Dedicated server, you will want to make sure that the cPanel account you’re using to connect has SSH access as well. If you are using a standard FTP account, or using port 21, the connection will fail.

  • Thank you!!! After hours of searching, this was the easiest, more straightforward way to understand and connect!

Was this article helpful? Let us know!