Skip to content

Commit

Permalink
Merge branch '2.0' into 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
terrafrost committed Mar 8, 2020
2 parents ddd5a08 + 21c5aa3 commit b1a1fb5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions phpseclib/Net/SSH2.php
Original file line number Diff line number Diff line change
Expand Up @@ -2046,6 +2046,15 @@ private static function bad_algorithm_candidate($algorithm)
public function login($username, ...$args)
{
$this->auth[] = array_merge([$username], $args);

// try logging with 'none' as an authentication method first since that's what
// PuTTY does
if ($this->sublogin($username)) {
return true;
}
if (!count($args)) {
return false;
}
return $this->sublogin($username, ...$args);
}

Expand Down

0 comments on commit b1a1fb5

Please sign in to comment.