Hetzner - DokuWiki

KonsoleH:Zugriff per FTP/en

Inhaltsverzeichnis

What is FTP?

FTP stands for File Transfer Protocol. Via FTP you can upload and download files to and from a server.

If you design a website you usually do so on your home computer. Using FTP you can then transfer the files of your website to your account, making them publicly available. The access details for FTP can be viewed and changed in konsoleH.

The menu "Access details" -> "FTP"

Here you have the ability to inspect the FTP access details and to change them. You can also enter additional FTP users who have access only to certain directories.

When setting up your account you are given standard FTP access details. If you want to change this information, you can set your own password.

Choosing your own password

An FTP password should meet the following requirements:

  • It must be longer than 3 characters but shorter than 17 characters.
  • There must be at least one number and at least one letter present.
  • To increase the security of your password, you should use both uppercase and lowercase characters.
  • Please note that special characters are not allowed, with the exception of the underscore ("_").

To change the FTP password, simply enter your new password into the appropriate text entry box and click on "Save".

Additional FTP users

For additional FTP users you can determine which directories they can access.

Uploading files via FTP

Uploading files is done most easily with a suitable FTP program. In this program you can enter your server address and the required FTP access details, and then connect to your account.

Once you have logged in you will see a number of directories, like logs, user and public.

Important for your website is the directory public_html. That's where you need to upload the files for your website.

Encrypted FTP access

In order to guarantee the highest level of security when transferring data you can get SSL-encrypted access. All you need is an appropriate FTP client (e.g. FileZilla, WinSCP) and you can select the appropriate option. There are 2 different protocols:

FTPS (FTP/SSL)

Hereby FTP is encrypted via SSL. Please note the following:

  • In some programs, a distinction is made between explicit and implicit SSL encryption. In this case select explicit (FTPES)

SFTP (FTP via SSH)

Hereby SSH is used to transfer files. Please note the following:

  • The port used is 22

SFTP with key authentication

Enable SFTP with key authentication depends on the operating system you use:

Windows

Download the program puttygen from the Putty website. Create a private/public key with puttygen via Key -> Generate Key pairs

  • Save the private key in a safe place. We also recommend to set a password for this key.
  • Save the public key under the file name authorized_sftpkeys
  • Load the public key in your webspace
    • Place a new directory called .ssh in the home directory
    • Load the file authorized_sftpkeys into this directory

The final step to connect is to input the path to the private key in the FTP program. For many FTP programs (like Filezilla) an add-on program must be used: Plink

Linux
  • Generate an OpenSSH key using ssh-keygen (if not already done)
  • Convert the format of the public key ssh-keygen -e -f ~/.ssh/id_rsa.pub
  • Save the generated public key under the file name authorized_sftpkeys in the .ssh folder

The final step to connect is to input the path to the private key in the FTP program.

FTP programs

There are many FTP programs that can be downloaded from the internet. Recommended programs include:

FileZilla

  • Start FileZilla
  • Choose File -> Site Manager
  • Click on the New Site button near the bottom of the page, to start a new connection
  • The icon with the words New FTP Site will be highlighted. Enter the name of your site
  • Enter the following information:
    • Host: your-domain.com
    • Server Type: FTP (unencrypted or explicit encryption) or SFTP
    • Logon Type: Normal
    • User: FTP user name
    • Password: FTP password
  • Click on "Connect"
  • When you are connected, double click on the public_html directory and transfer the website files (please note that the home page of the website must have the name index.html)

WinSCP

  • Start WinSCP
  • Enter the following information:
    • Host name: your-domain.com
    • User name: FTP user name
    • Password: FTP password
  • Click on "Login"
  • When you are connected, double click on the public_html directory and transfer the website files (please note that the home page of the website must have the name index.html)

Cyberduck

  • Start Cyberduck
  • Enter the following information:
    • Server: your-domain.com
    • User name: FTP user name
    • Password: FTP password
  • Click on "Connect"
  • When you are connected, double click on the public_html directory and transfer the website files (please note that the home page of the website must have the name index.html)

Important Instructions

  • All the files that you want to be open to the public need to be saved in the public_html directory.
  • The Binary Transfer Mode needs to be used when transferring picture files (e.g. .gif, .jpeg).
  • The ASCII Mode should be activated when transferring files that can be read as normal text files (e.g. .html, .cgi). When the wrong mode is chosen to tranfer files, it can lead to destroyed images and CGI scripts.
  • File names: our Linux servers are case sensitive, meaning lower and upper case letters are consider different. In other words, the file "faq.html" is NOT the same as the file "FAQ.html". Incorrect link references will return a "File Not Found" error. This also applies to directory names. To avoid such errors we recommend writing all file names in lower case.
  • Special characters (! @ # $ % ^ & * : ' ~) in file names are not allowed.


© 2012. Hetzner Online AG. Alle Rechte vorbehalten.