diff options
author | Ryo Nakamura <upa@haeena.net> | 2024-04-14 15:49:27 +0900 |
---|---|---|
committer | Ryo Nakamura <upa@haeena.net> | 2024-04-14 16:22:31 +0900 |
commit | 4ce62079cf1254553cd34e5d3b315e1548bfa191 (patch) | |
tree | fcf4188cbfa79402c933f37db9bd218fc3d235b8 /src/ssh.c | |
parent | e47d5b76e6cfcd649960019ca8c58d7c5d5a5930 (diff) |
add -J proxyjump option (#15)
Diffstat (limited to 'src/ssh.c')
-rw-r--r-- | src/ssh.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -88,6 +88,16 @@ static int ssh_set_opts(ssh_session ssh, struct mscp_ssh_opts *opts) return -1; } + if (opts->proxyjump) { + char buf[256]; + memset(buf, 0, sizeof(buf)); + snprintf(buf, sizeof(buf), "proxyjump=%s", opts->proxyjump); + if (ssh_config_parse_string(ssh, buf) != SSH_OK) { + priv_set_errv("failed to set ssh option: %s", buf); + return -1; + } + } + if (opts->options) { int n; for (n = 0; opts->options[n]; n++) { |