Skip to main content

Create SFTP

To create an SFTP connection between your endpoints, click on the EndpointsCreate SFTP button in the Portola Console. This will open a form where you can specify the details of the SFTP connection you want to create.

  • Server Endpoint: The endpoint where you want the SFTP service to run.
  • Auth Type: The authentication method you want to use for the SFTP connection. You can choose between:
    • Password: Use a password for authentication. You will be able to use the username/password combination to connect to the SFTP server endpoint. This account corresponds to the user account the Portola App is running as on the server endpoint.
    • Public Key: Use a public key for authentication. This is the recommended method for secure connections. A key pair is automatically generated by Portola App (on client side), and is stored under ~/.portola/ssh/ directory. You can use this private key to SSH into the server endpoint. The corresponding public key is automatically made available to the SFTP server endpoint.
  • Path: The path on the server endpoint where you want to access the SFTP service. This can be a specific subdirectory under the home directory of the user account running the Portola App on the server endpoint, or it can be the home directory itself.
  • Access Type: The type of access you want to grant for the SFTP connection. You can choose between:
    • Read-Only: The SFTP client can only read files from the specified path.
    • Read-Write: The SFTP client can read and write files to the specified path.
  • Client Endpoint: The endpoint where you want to access the SFTP service from.
  • Client Port: The port on the client endpoint where the SFTP service will be forwarded.

Once you fill in the details, click on the Create button to create the SFTP connection. The Portola Network will handle the rest, and you will see the new SFTP connection listed in your endpoints. The connection will be active and ready to use immediately.

Using the SFTP Tunnel

Once the SFTP connection is created, you can access it using any SFTP client on the Client Endpoint (only). You can use the following details to connect:

# Note:
# -P specifies the port to connect to on the client endpoint.
# -i specifies the path to the private key file which is automatically generated by Portola App and stored under `~/.portola/ssh_keystore/ssh_host_key`.

sftp -P <client_port> -i ~/.portola/ssh_keystore/ssh_host_key localhost