else
cp = av0;
if (strcmp(cp, "rsh") != 0 && strcmp(cp, "ssh") != 0 &&
- strcmp(cp, "openssh") != 0 && strcmp(cp, "openlogin") != 0 &&
strcmp(cp, "rlogin") != 0 && strcmp(cp, "slogin") != 0)
host = cp;
}
/* Disable rhosts authentication if not running as root. */
- if (original_effective_uid != 0)
+ if (original_effective_uid != 0 || !options.use_privileged_port)
{
options.rhosts_authentication = 0;
options.rhosts_rsa_authentication = 0;
restore_uid();
/* Open a connection to the remote host. This needs root privileges if
- rhosts_{rsa_}authentication is true. */
-
- if (!options.use_privileged_port)
- {
- options.rhosts_authentication = 0;
- options.rhosts_rsa_authentication = 0;
- }
+ rhosts_{rsa_}authentication is enabled. */
ok = ssh_connect(host, &hostaddr, options.port, options.connection_attempts,
!options.rhosts_authentication &&