version 1.272, 2017/04/30 23:10:43 |
version 1.273, 2017/04/30 23:11:45 |
|
|
oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts, |
oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts, |
oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oCompression, |
oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oCompression, |
oCompressionLevel, oTCPKeepAlive, oNumberOfPasswordPrompts, |
oCompressionLevel, oTCPKeepAlive, oNumberOfPasswordPrompts, |
oUsePrivilegedPort, oLogFacility, oLogLevel, oCiphers, oProtocol, oMacs, |
oUsePrivilegedPort, oLogFacility, oLogLevel, oCiphers, oMacs, |
oPubkeyAuthentication, |
oPubkeyAuthentication, |
oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias, |
oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias, |
oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication, |
oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication, |
|
|
oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys, |
oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys, |
oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes, |
oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes, |
oPubkeyAcceptedKeyTypes, oProxyJump, |
oPubkeyAcceptedKeyTypes, oProxyJump, |
oIgnoredUnknownOption, oDeprecated, oUnsupported |
oIgnore, oIgnoredUnknownOption, oDeprecated, oUnsupported |
} OpCodes; |
} OpCodes; |
|
|
/* Textual representations of the tokens. */ |
/* Textual representations of the tokens. */ |
|
|
OpCodes opcode; |
OpCodes opcode; |
} keywords[] = { |
} keywords[] = { |
/* Deprecated options */ |
/* Deprecated options */ |
|
{ "protocol", oIgnore }, /* NB. silently ignored */ |
{ "fallbacktorsh", oDeprecated }, |
{ "fallbacktorsh", oDeprecated }, |
{ "globalknownhostsfile2", oDeprecated }, |
{ "globalknownhostsfile2", oDeprecated }, |
{ "rhostsauthentication", oDeprecated }, |
{ "rhostsauthentication", oDeprecated }, |
|
|
{ "cipher", oCipher }, |
{ "cipher", oCipher }, |
{ "ciphers", oCiphers }, |
{ "ciphers", oCiphers }, |
{ "macs", oMacs }, |
{ "macs", oMacs }, |
{ "protocol", oProtocol }, |
|
{ "remoteforward", oRemoteForward }, |
{ "remoteforward", oRemoteForward }, |
{ "localforward", oLocalForward }, |
{ "localforward", oLocalForward }, |
{ "user", oUser }, |
{ "user", oUser }, |
|
|
case oBadOption: |
case oBadOption: |
/* don't panic, but count bad options */ |
/* don't panic, but count bad options */ |
return -1; |
return -1; |
|
case oIgnore: |
|
return 0; |
case oIgnoredUnknownOption: |
case oIgnoredUnknownOption: |
debug("%s line %d: Ignored unknown option \"%s\"", |
debug("%s line %d: Ignored unknown option \"%s\"", |
filename, linenum, keyword); |
filename, linenum, keyword); |
|
|
*charptr = xstrdup(arg); |
*charptr = xstrdup(arg); |
break; |
break; |
|
|
case oProtocol: |
|
intptr = &options->protocol; |
|
arg = strdelim(&s); |
|
if (!arg || *arg == '\0') |
|
fatal("%.200s line %d: Missing argument.", filename, linenum); |
|
value = proto_spec(arg); |
|
if (value == SSH_PROTO_UNKNOWN) |
|
fatal("%.200s line %d: Bad protocol spec '%s'.", |
|
filename, linenum, arg ? arg : "<NONE>"); |
|
if (*activep && *intptr == SSH_PROTO_UNKNOWN) |
|
*intptr = value; |
|
break; |
|
|
|
case oLogLevel: |
case oLogLevel: |
log_level_ptr = &options->log_level; |
log_level_ptr = &options->log_level; |
arg = strdelim(&s); |
arg = strdelim(&s); |
|
|
options->macs = NULL; |
options->macs = NULL; |
options->kex_algorithms = NULL; |
options->kex_algorithms = NULL; |
options->hostkeyalgorithms = NULL; |
options->hostkeyalgorithms = NULL; |
options->protocol = SSH_PROTO_UNKNOWN; |
|
options->num_identity_files = 0; |
options->num_identity_files = 0; |
options->num_certificate_files = 0; |
options->num_certificate_files = 0; |
options->hostname = NULL; |
options->hostname = NULL; |
|
|
if (options->cipher == -1) |
if (options->cipher == -1) |
options->cipher = SSH_CIPHER_NOT_SET; |
options->cipher = SSH_CIPHER_NOT_SET; |
/* options->hostkeyalgorithms, default set in myproposals.h */ |
/* options->hostkeyalgorithms, default set in myproposals.h */ |
if (options->protocol == SSH_PROTO_UNKNOWN) |
|
options->protocol = SSH_PROTO_2; |
|
if (options->add_keys_to_agent == -1) |
if (options->add_keys_to_agent == -1) |
options->add_keys_to_agent = 0; |
options->add_keys_to_agent = 0; |
if (options->num_identity_files == 0) { |
if (options->num_identity_files == 0) { |
if (options->protocol & SSH_PROTO_1) { |
add_identity_file(options, "~/", _PATH_SSH_CLIENT_ID_RSA, 0); |
add_identity_file(options, "~/", |
add_identity_file(options, "~/", _PATH_SSH_CLIENT_ID_DSA, 0); |
_PATH_SSH_CLIENT_IDENTITY, 0); |
add_identity_file(options, "~/", _PATH_SSH_CLIENT_ID_ECDSA, 0); |
} |
add_identity_file(options, "~/", |
if (options->protocol & SSH_PROTO_2) { |
_PATH_SSH_CLIENT_ID_ED25519, 0); |
add_identity_file(options, "~/", |
|
_PATH_SSH_CLIENT_ID_RSA, 0); |
|
add_identity_file(options, "~/", |
|
_PATH_SSH_CLIENT_ID_DSA, 0); |
|
add_identity_file(options, "~/", |
|
_PATH_SSH_CLIENT_ID_ECDSA, 0); |
|
add_identity_file(options, "~/", |
|
_PATH_SSH_CLIENT_ID_ED25519, 0); |
|
} |
|
} |
} |
if (options->escape_char == -1) |
if (options->escape_char == -1) |
options->escape_char = '~'; |
options->escape_char = '~'; |
|
|
return fmt_multistate_int(val, multistate_canonicalizehostname); |
return fmt_multistate_int(val, multistate_canonicalizehostname); |
case oFingerprintHash: |
case oFingerprintHash: |
return ssh_digest_alg_name(val); |
return ssh_digest_alg_name(val); |
case oProtocol: |
|
switch (val) { |
|
case SSH_PROTO_1: |
|
return "1"; |
|
case SSH_PROTO_2: |
|
return "2"; |
|
case (SSH_PROTO_1|SSH_PROTO_2): |
|
return "2,1"; |
|
default: |
|
return "UNKNOWN"; |
|
} |
|
default: |
default: |
switch (val) { |
switch (val) { |
case 0: |
case 0: |
|
|
dump_cfg_fmtint(oNoHostAuthenticationForLocalhost, o->no_host_authentication_for_localhost); |
dump_cfg_fmtint(oNoHostAuthenticationForLocalhost, o->no_host_authentication_for_localhost); |
dump_cfg_fmtint(oPasswordAuthentication, o->password_authentication); |
dump_cfg_fmtint(oPasswordAuthentication, o->password_authentication); |
dump_cfg_fmtint(oPermitLocalCommand, o->permit_local_command); |
dump_cfg_fmtint(oPermitLocalCommand, o->permit_local_command); |
dump_cfg_fmtint(oProtocol, o->protocol); |
|
dump_cfg_fmtint(oProxyUseFdpass, o->proxy_use_fdpass); |
dump_cfg_fmtint(oProxyUseFdpass, o->proxy_use_fdpass); |
dump_cfg_fmtint(oPubkeyAuthentication, o->pubkey_authentication); |
dump_cfg_fmtint(oPubkeyAuthentication, o->pubkey_authentication); |
dump_cfg_fmtint(oRequestTTY, o->request_tty); |
dump_cfg_fmtint(oRequestTTY, o->request_tty); |