exit(1);
}
- if(findkey(kv, "ENABLE_SSH_PROTOCOL1", buffer) && !strcmp(buffer,"on"))
- strlcat(command, "s/^Protocol .*$/Protocol 2,1/;", STRING_SIZE - 1 );
- else
- strlcat(command, "s/^Protocol .*$/Protocol 2/;", STRING_SIZE - 1 );
+ strlcat(command, "s/^Protocol .*$/Protocol 2/;", STRING_SIZE - 1 );
if(findkey(kv, "ENABLE_SSH_KEYS", buffer) && !strcmp(buffer,"off"))
strlcat(command, "s/^RSAAuthentication .*$/RSAAuthentication no/;" "s/^PubkeyAuthentication .*$/PubkeyAuthentication no/;", STRING_SIZE - 1 );
else
strlcat(command, "s/^Port .*$/Port 222/", STRING_SIZE - 1 );
+ if(findkey(kv, "SSH_AGENT_FORWARDING", buffer) && !strcmp(buffer,"on"))
+ strlcat(command, "s/^AllowAgentForwarding .*$/AllowAgentForwarding yes/;", STRING_SIZE - 1 );
+ else
+ strlcat(command, "s/^AllowAgentForwarding .*$/AllowAgentForwarding no/;", STRING_SIZE - 1 );
+
freekeyvalues(kv);
snprintf(buffer, STRING_SIZE - 1, "' /etc/ssh/sshd_config >&%d", config_fd );