Skip to main content
SSH Protocols
Updated over a year ago

SFTP/FISH Protocols

SFTP (SSH File Transfer Protocol) and FISH (Files transferred over Shell protocol) allow you to perform several file management operations over the secure channel.

We implement the threaded daemon for SFTP connection processes to provide support of SFTP (Secure File Transfer Protocol). It allows to you access, manage and transfer files directly to the container via an SSH gate, ensuring data security.

FISH protocol (Files transferred over Shell protocol) is supported by several popular FTP clients and file managers due to the access it gives to securely manage a container?s file system.

SFTP

The public SSH key that you previously added to the Jelastic dashboard will generate a private key on your local machine. Use this key to access a container via SFTP protocol.
This private key is automatically saved during key generation if you are using Linux/macOS.
You should manually save the private key if you are using Windows.

For example the PuTTYgen tool:

1-Private-key.png

Now proceed with establishing the SFTP connection.

1- Run your FTP client with SFTP protocol support. In this example, we will illustrate FileZilla, therefore, go to the Edit > Settings.

2-Edit-settings.png

2- Next go to the SFTP section. Select the Add key file and choose the private SSH key that you previously saved. Click OK.

3-Filezilla-private-key.png

3- Next, go to File > Site Manager.

4-Site-manager.png

4- Next, click the New site and specify the parameters as below:

  • at Host, state your SSH host (gate.{hoster_domain})

  • at Port, enter the 3022 value.

  • choose SFTP in the Protocol drop-down list.

  • choose Normal Logon Type.

  • at User, enter the Node ID of the desired container (you can find it at the particular environment?s containers list at the separate nodeid column via SSH console) and your User ID (the number before @ symbol in your SSH connection string) separated with a hyphen. Finally, click the Connect button.

5-Filezilla-settings.png

5- After establishing the connection is established, you can see the list of container?s folders in the appropriate frames:

6-Remote-site.png

You can manage and transfer your application?s files over the secure channel.

FISH

We will now illustrate the FISH protocol use via establishing a secure connection between a remote container and the Midnight Commander tool.

1. First, make sure you have a private key on your local machine that corresponds to the public SSH key previously added to the dashboard. The default path will be /home/

/.ssh/id_rsa or /home/

/.ssh/id_dsa file, depending on the key pair type that you generated.

2- Next, execute one of the following commands, to check the ownership and attributes of your private:

  • for RSA key ls -la /home//.ssh/id_rsa

  • for DSA key ls -la /home//.ssh/id_dsa Ownership should be stated as your username and attributes should be 400 or 600 (e.g. the connection will not be established if your private key can be read by other users)

3- Install and run your Midnight Commander.

4- Select F9 to show the menu toolbar. Next, open the left or right panel?s menu and choose the Shell link.

7-Shell-link.png

5- At Shell link to the machine frame, enter the following values separated by a hyphen:

  • Node ID of the desired container (can be seen in the particular environment?s containers list in the separate nodeid column via SSH console)

  • your SSH connection string ({user_id}@{ssh_host}:3022 ). Click OK.

8-Ssh-conections-string.png

6- After establishing the connection, you will see the container?s file structure in the appropriate panel (in our example, on the right).

9-Container-structure.png

You can securely manage your container?s file system via RSH commands.

Did this answer your question?