PoolByte

SFTP file transfer: Secure access and deployment checks

· PoolByte Technology

SFTP file transfer: Secure access and deployment checks

File transfer via SFTP is a working method that moves website files over SSH. However, choosing secure transmission is not just about changing a protocol name in practice. It is also necessary to verify that you are connecting to the correct server, understand which folders the access covers and check that the file actually goes to the right place. This guide creates a controlled transfer process for a small web project.

Clarify the distinction between SFTP and FTPS

SFTP and FTPS are not the same protocol. SFTP is SSH-based file transfer; FTPS, on the other hand, is based on protecting the FTP connection with TLS. Don't randomly change options on the client until you know which method the provider supports. Also distinguish between plain FTP and protected transfer methods.

Some hosting plans may not include SSH or SFTP access. The available method depends on account authority and server configuration. Do not install with the assumption that “there is cPanel, therefore there is definitely SFTP”. The server address, connection method and port must be specified in the current connection information. The information requested by the client used and the information provided by the provider must have the same meaning.

Verify server identity on first connection

Verify the server key fingerprint seen in the SSH connection through a separate trusted channel. Automatically accepting the connection application's warning does not prove that the target is the correct server. If a key change warning appears on a previously working connection, first check the reason with the provider. The server may have changed; There may also be unexpected redirects.

OpenSSH sftp guide explains that the transfer uses SSH connection and authentication. If there is key-based access, the private key should be kept secure on your device and not sent to anyone else. When sharing error information for support, do not include the key, password, or access file in the message. Also check the sensitive areas visible in the screenshot.

Keep access scope to what the job requires

It is not always necessary for the person who will transfer files to manage the entire hosting account. Select the appropriate user and folder scope in the access model supported by the provider. Determine in advance how temporary access will be removed when the job is finished. The access of a person who leaves the team is not closed by simply deleting the application from their device.

Do not loosen file permissions en masse during transfer. If a file doesn't work, it could be due to wrong directory, ownership, server setting, or application error. Giving wide write permissions to all folders without understanding the reason creates a new risk. Consider together the hosting provider's proposed permissions scheme and the actual writing needs of the application.

Check source and destination folder visibly

Two panels of the client may have similar folder names. Explicitly confirm the local project root and remote release root before transferring. While public_html is used in one project, a different broadcast directory may be selected in another project. Accidentally dropping the project archive into the web root may make files accessible that should not be published.

Prepare the list of files to be sent. Source code, compiled output, dependencies, user installations, and environment configuration carry different roles. Do not overwrite the live configuration with the local sample file. Database files, backups, and private keys should not be kept in the customer-facing release directory. The transfer package should only contain the content that needs to be published.

Launch major update with minor verification

Prepare the possibility of rolling back to the current version before changing important files. If possible, complete the version files in a separate directory and change the release in a controlled manner. The applicability of this method depends on the server and application structure. If not supported, plan in what order the files will change and what will happen in the intermediate state.

Read the client's list of errors and skipped files when the transfer is complete. “Connection closed” does not indicate that all files arrived successfully. Size or checksum checks can be performed on critical files. Test that a static file, form, and session flow are working as well as opening the new version of the web page.

Leave a record when the job is completed

  • The version or package name transferred.
  • Target release directory and commit time.
  • Files transferred successfully and files with errors.
  • Short control scenarios implemented in a live environment.
  • Location and principal of the return file.

OpenSSH ssh guide is also the official reference for access and key behavior. These documents describe the connection technique; It does not mean that every hosting account supports the same features.

You can ask PoolByte for transfer coverage with current hosting plan. Git version control guide for keeping track of which version the files belong to, and web hosting page for infrastructure selection are useful continuations.