SSH Proxy Configuration

To configure your first Generic Extractor, follow our tutorial. Use Parameter Map to help you navigate among various configuration options.

An SSH proxy for Generic Extractor allows you tu securely access HTTP(s) endpoints inside your private network. It creates an SSH tunnel, and all traffic from Generic Extractor is forwarded through the tunnel to the destination server.

A sample config configuration can look like this:

{
    ...,
    "sshProxy": {
        "host": "proxy.example.com",
        "user": "proxy",
        "port": 22,
        "#privateKey": "-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----"
    }
}

Usage

Before using an SSH proxy, set up an SSH proxy server to act as a gateway to your private network where your destination server resides.

Complete the following steps to set up an SSH proxy for Generic Extractor:

1. Set Up SSH Proxy Server

Here is a very basic Dockerfile example. All it does is run an sshd daemon and expose port 22. You can, of course, set this up in your system in a similar way without using Docker.

FROM ubuntu:14.04

RUN apt-get update

RUN apt-get install -y openssh-server
RUN mkdir /var/run/sshd

RUN echo 'root:root' |chpasswd

RUN sed -ri 's/^PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config

EXPOSE 22

CMD    ["/usr/sbin/sshd", "-D"]

This server should be in the same private network where your destination server resides. It should be accessible publicly from the internet via SSH. The default port for SSH is 22, but you can choose a different port.

We highly recommend to allow access only from the Keboola IP address ranges.

See the following pages for more information about setting up SSH on your server:

2. Generate SSH Key Pair

Generate an SSH key pair and copy the public key to your SSH proxy server. Paste it to the public.key file, and then append it to the authorized_keys file.

mkdir ~/.ssh
cat public.key >> ~/.ssh/authorized_keys

3. Configure Generic Extractor SSH Proxy

{
    ...,
    "sshProxy": {
        "host": "your-ssh-proxy-host",
        "user": "ssh-proxy-user",
        "port": 22,
        "#privateKey": "your-generated-private-key"
    }
}

See example [EX131]. and example [EX133].