SFTP/FISH Protocols
This guide has been reviewed and reformatted for Ruk-Com Cloud PaaS. Screens may vary slightly by platform version.
Click or tap a screenshot to view it at its original size.
Objective
This guide explains how to use SFTP/FISH Protocols on Ruk-Com Cloud PaaS, with ordered procedures and practical verification points.
Before you begin
- Sign in with an account permitted to manage the relevant environment.
- Confirm the target environment, region and resources before saving changes.
- Create a backup or rollback plan before changing a production system.
SFTP(SSH File Transfer Protocol) andFISHFiles transferred over Shell protocol is a protocol that helps you manage files (access, transfer, etc.) over a secure channel.
We supportSFTP(Secure File Transfer Protocol) using a threaded daemon for processing SFTP connections, which allows you to access, manage, and transfer files directly to containers via SSH Gate, and thus guarantees data security.
FISHThe protocol (Files transferred over Shell protocol) is supported by FTP clients and popular file managers (such as Midnight Commander, Konqueror, lftp, Krusader, etc.), allowing secure access to manage the container's file system. So let's look at some examples of using these protocols.
SFTP
To access the container via the SFTP protocol, you will need a private key on your machine that corresponds to the public SSH key in the previously added dashboard. If you are using Windows, you should also record an additional private key that corresponds to your public SSH key (we use the PuTTYgen tool as an example):
You can now proceed to create the SFTP connection.
1. Run the FTP-client with the SFTP protocol. In this example we are using FileZilla, so go to the menu.Edit > Settings
2. When the Settings page opens, go to the SFTP section. Select the button.Add keyfileand select the private key you saved earlier, then click OK.
3. After that go to the menuFile > Site Manager
4. Click the buttonNew siteand specify the parameters as follows
- in the channelHostSpecify your SSH host (gate.{hoster_domain})
- in the channelPortSpecify port 3022
- Protocol SelectSFTPIn the drop-down menu
- Logon Type selectNormal
- in the channelUserSpecify the Node ID of the desired container. (can be seen in the list environment's containers only in the nodeid column separated from web SSH) and your User ID (the number before the @ symbol in the SSH connection string), separated by a hyphen (-), then click the button.Connect
After the connection is established You will see a list of the container's folders:
Now you can safely manage and transfer files to your application.
FISH
Let's look at an example using the FISH protocol through establishing a secure connection between a remote container and the Midnight Commander appliance.
1. The first step is to make sure you have a private key on your machine that corresponds to the public SSH key added to the dashboard previously. The default path is/home//.ssh/id_rsaor/home//.ssh/id_dsaIt depends on the type of key pair you created.
2. Verify the ownership and properties of the private key by entering one of the following commands.
- For RSA keyls -la /home//.ssh/id_rsa
- for DSA keyls -la /home/<username>/.ssh/id_dsaOwnership should be specified asusernameand attributes should be400or600For example, your private key should not be read by other users. Otherwise, no connection will be established.
3. Install and run.Midnight Commander
4. Press F9 to display the menu toolbar. Then open the left or right panel menu and select the item.Shell link
5. On the pageShell linkEnter the following values separated by a hyphen (-) :
Node ID of the desired container
- Connect to your SSH ({user_id}@{ssh_host}:3022) ClickOK.
6. Once the connection is established You will see the container's file structure on the right.
You can now securely manage your container's file system by using RSH commands.