Menu

#4531 timeout on /usr/libexec/webmin/status/rssh-monitor.pl

1.730
closed-fixed
nobody
5
2015-01-26
2015-01-04
Christian
No

Hi,

if user root has PubkeyAuthentication like /root/.ssh/id_rsa
(with a great password) then the /usr/libexec/webmin/status/rssh-monitor.pl comes to an timeout.

Here my patch:

*** /usr/libexec/webmin/status/rssh-monitor.pl  Thu Jan  1 12:16:50 2015
--- /usr/libexec/webmin-1.730/status/rssh-monitor.pl    Wed Dec 31 19:06:34 2014
***************
*** 7,13 ****
  &foreign_require("proc", "proc-lib.pl");
  local $ruser = $_[0]->{'ruser'} || "root";
  local ($fh, $fpid) = &proc::pty_process_exec(
!       "ssh -o PubkeyAuthentication=no ".
        ($_[0]->{'port'} ? "-p ".quotemeta($_[0]->{'port'})." " : "").
        quotemeta($ruser)."\@".
        quotemeta($_[0]->{'host'})." echo ok");
--- 7,13 ----
  &foreign_require("proc", "proc-lib.pl");
  local $ruser = $_[0]->{'ruser'} || "root";
  local ($fh, $fpid) = &proc::pty_process_exec(
!       "ssh ".
        ($_[0]->{'port'} ? "-p ".quotemeta($_[0]->{'port'})." " : "").
        quotemeta($ruser)."\@".
        quotemeta($_[0]->{'host'})." echo ok");

I just added "-o PubkeyAuthentication=no" to the call of "ssh".
Can you please confirm and fix (or make it configurable).

TIA

Bye
Christian

Discussion

  • Jamie Cameron

    Jamie Cameron - 2015-01-04

    Wouldn't that change prevent an SSH key from being used to login to the remote system, even if one was setup?

     
  • Christian

    Christian - 2015-01-05

    good point, but then you should provide a way to check and enter a password/passphrase.

    what is about this?

    # diff -c  /usr/libexec/webmin-1.730/status/rssh-monitor.pl-org  /usr/libexec/webmin-1.730/status/rssh-monitor.pl-new
    *** /usr/libexec/webmin-1.730/status/rssh-monitor.pl-org        Mon Jan  5 11:22:02 2015
    --- /usr/libexec/webmin-1.730/status/rssh-monitor.pl-new        Mon Jan  5 11:25:29 2015
    ***************
    *** 13,19 ****
            quotemeta($_[0]->{'host'})." echo ok");
      local ($out, $wrong_password, $connect_failed, $got_password);
      while(1) {
    !       local $rv = &wait_for($fh, "password:", "yes\\/no", "(^|\\n)\\s*Permission denied.*\n", "ssh: connect.*\n", ".*\n");
            $out .= $wait_for_input;
            if ($rv == 0) {
                    if ($_[0]->{'rpass'} eq '*') {
    --- 13,19 ----
            quotemeta($_[0]->{'host'})." echo ok");
      local ($out, $wrong_password, $connect_failed, $got_password);
      while(1) {
    !       local $rv = &wait_for($fh, "password:|passphrase.*:", "yes\\/no", "(^|\\n)\\s*Permission denied.*\n", "ssh: connect.*\n", ".*\n");
            $out .= $wait_for_input;
            if ($rv == 0) {
                    if ($_[0]->{'rpass'} eq '*') {
    

    Christian

     
  • Jamie Cameron

    Jamie Cameron - 2015-01-05
    • status: open --> closed-fixed
     
  • Jamie Cameron

    Jamie Cameron - 2015-01-05

    Nice idea - I will include this in the next release.

     

Log in to post a comment.

MongoDB Logo MongoDB