Index: sshd.c =================================================================== --- sshd.c +++ sshd.c @@ -2159,6 +2159,10 @@ */ remote_ip = ssh_remote_ipaddr(ssh); +#ifdef HAVE_LOGIN_CAP + /* Cache remote hostname for sandboxed child. */ + auth_get_canonical_hostname(ssh, options.use_dns); +#endif #ifdef SSH_AUDIT_EVENTS audit_connection_from(remote_ip, remote_port); #endif