diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 961545c2..8dd6a1f6 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -1338,10 +1338,9 @@ class Net_SSH2 { return $this->_privatekey_login($username, $password); } - $utf8_password = utf8_encode($password); $packet = pack('CNa*Na*Na*CNa*', NET_SSH2_MSG_USERAUTH_REQUEST, strlen($username), $username, strlen('ssh-connection'), 'ssh-connection', - strlen('password'), 'password', 0, strlen($utf8_password), $utf8_password + strlen('password'), 'password', 0, strlen($password), $password ); if (!$this->_send_binary_packet($packet)) {