src/sb/SSH2/Shell.php
public function exec($command, $timeout=30, $with_login_env=true)
    {
        stream_set_timeout($this->shell, $timeout);
        if($with_login_env){
            $command = 'bash -l '.$command;
        }

        return fwrite($this->shell, $command.PHP_EOL);
    }
public function exec($command, $timeout=30, $with_login_env=true)
    {
        stream_set_timeout($this->shell, $timeout);
        if($with_login_env){
            $command = 'bash -l '.$command;
        }

        return fwrite($this->shell, $command.PHP_EOL);
    }
public function exec ( $ command , $ timeout = 30 , $ with_login_env = true ) { stream_set_timeout ( $ this -> shell , $ timeout ) ; if ( $ with_login_env ) { $ command = 'bash -l ' . $ command ; } return fwrite ( $ this -> shell , $ command . PHP_EOL ) ; }
Execute a command on the interactive shell
@param string $command The command to exec
@param boolean $with_login_env o run a shell script with all the variables that you would have when logged in interactively
@return boolean
Execute a command on the interactive shell