Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support ssh hopping #7

Closed
xfgong opened this issue May 30, 2018 · 2 comments
Labels

Comments

@xfgong
Copy link

@xfgong xfgong commented May 30, 2018

Hi Kelvin,

My dev host is behind a jumper server, support ssh hopping which ssh2 already supported will be nice.

@SchoofsKelvin

This comment has been minimized.

Copy link
Owner

@SchoofsKelvin SchoofsKelvin commented Jun 1, 2018

I'll see if I can implement this using ssh2's forwardOut method, and otherwise use something similar to the netcat example you linked.

The feature will most likely be used like this:
(using the same example IP/ports from the ssh2 example)

{
    "sshfs.configs": [
        // The hop to go through
        {
            "name": "conn1",
            "host": "192.168.1.1",
            "username": "user1",
            "password": "password1"
        },
        // The actual wanted SSH connection
        {
            "name": "conn2",
            "host": "192.168.1.2",
            "username": "user2",
            "password": "password2",
            // New field (using existing configuration)
            "hop": "conn1"
        },
        // The actual wanted SSH connection (configured another way)
        {
            "name": "conn2-alternative",
            "host": "192.168.1.2",
            "username": "user2",
            "password": "password2",
            // New field (using inline configuration)
            "hop": {
                "host": "192.168.1.1",
                "username": "user1",
                "password": "password1"
            }
        }
    ]
}

The "hop": "conn1" would be implemented first. I might add the inline version too (either would work), but might not be present in the first version of this feature.

@SchoofsKelvin

This comment has been minimized.

Copy link
Owner

@SchoofsKelvin SchoofsKelvin commented Jun 5, 2018

Connection hopping has been added (eb2425a) in version 1.7.0

Currently, you'll have to add the hop as a configuration, then add "hop": "hop-config" to your actual configuration you want to connect with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.