Ferreteria/v0.6/clade/IO/Aspect/Connx/Plug/Shell/Remote/SSH/removed

From Woozle Writes Code
< Ferreteria‎ | v0.6‎ | clade‎ | IO‎ | Aspect‎ | Connx‎ | Plug‎ | Shell‎ | Remote‎ | SSH
Jump to navigation Jump to search
Removed Code

2025-12-04

Commented out from DoCommand() earlier:

#
        $oAct = $this->NewAction();

        $oCreds = $this->Creds();
        $sHost = $oCreds->QHost()->GetIt();
        $sUser = $oCreds->QUser()->GetIt();
        $sPort = $oCreds->QPort()->GetStrNz('',' -p ');
        $sCmdSafe = escapeshellarg($sCmd);

        $sCmdFull = "ssh$sPort $sUser@$sHost $sCmdSafe";

2025-06-03

Commented out on 2025-05-28:

#
    // 2025-05-28 old
    public function __construct(private CredsIface $oCreds) {
        $oCreds->QPort()->SetDefault(22); // SSH default port
    }
    public function Creds() : CredsIface { return $this->oCreds; }

2024-12-03

It looks like this was moved to ../Opener.php:

#
    private int $nOpens = 0;
    public function Open() : ActionIface {
        $nOpens = $this->nOpens++;
        if ($nOpens == 0) {
            $oAct = $this->ActualOpen();
        } else {
            $oAct = new ActionIface();
            $oAct->SetNoOp();
        }
        return $oAct;
    }
    public function Shut() : ActionIface {
        $nOpens = --$this->nOpens;
        if ($nOpens == 0) {
            $oAct = $this->ActualShut();
        } else {
            $oAct = new ActionIface();
            $oAct->SetNoOp();
        }
        return $oAct;
    }

2024-11-27

This never worked anyway -- gives a "Segmentation fault (core dumped)" error -- but that's ok, because ssh2_auth_agent() was the one I wanted to use anyway. I only tried this when that wasn't working (which turned out to be because you have to explicitly add keys to the SSH Agent).

This was in Open(), in place of the ssh2_auth_agent() call:

#
        $ok = ssh2_auth_pubkey_file($rSSH,$sUser,'/home/woozle/.ssh/id_ed25519.pub','/home/woozle/.ssh/id_ed25519');