mirror of
https://github.com/upa/mscp.git
synced 2026-02-13 08:34:41 +08:00
add -J proxyjump option (#15)
This commit is contained in:
10
src/ssh.c
10
src/ssh.c
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user