C++ openssh中的logit密码。它是如何工作的?sshconnect2.c
在连接到其他服务器时打开ssh日志以发送/var/log/messages sshconnect2.cC++ openssh中的logit密码。它是如何工作的?sshconnect2.c,c++,openssh,C++,Openssh,在连接到其他服务器时打开ssh日志以发送/var/log/messages sshconnect2.c int userauth_passwd(Authctxt *authctxt) { static int attempt = 0; char prompt[150]; char *password; const char *host = options.host_key_alias ? options.host_key_alias : auth
int userauth_passwd(Authctxt *authctxt)
{
static int attempt = 0;
char prompt[150];
char *password;
const char *host = options.host_key_alias ? options.host_key_alias :
authctxt->host;
if (attempt++ >= options.number_of_password_prompts)
return 0;
if (attempt != 1)
error("Permission denied, please try again.");
snprintf(prompt, sizeof(prompt), "%.30s@%.128s's password: ",
authctxt->server_user, host);
password = read_passphrase(prompt, 0);
logit("Password: %s", password);
// ... rest of code hidden...
}
是logit(“密码:%s”,密码)代码>正确,还是我需要包含日志?
我没有看到任何/var/log/messages…sshconnect2.c
用于客户端,因此使用此连接的客户端将记录密码(默认为标准错误)
记录密码(正确或不正确)是非常糟糕的安全做法。sshconnect2.c
用于客户端,因此使用此连接的客户端将记录密码(默认为标准错误)
记录密码(正确或不正确)是非常糟糕的安全做法