protected function configureSSH(InputInterface $input, OutputInterface $output, QuestionHelper $questionHelper, $deployData)
    {
        $serverOptions = [
            'domain' => [
                'helper' => $deployData['ssh_user'],
                'label'  => 'Domain name',
            ],
        ];
        $sshOptions = [
            'forwardAgent' => [
                'label'  => 'SSH forward agent',
                'helper' => 'false',
            ],
            'authMethods' => [
                'label'  => 'SSH auth method',
                'helper' => 'publickey password',
            ],
            'keys' => [
                'label'  => 'Remote SSH key',
                'helper' => sprintf('/home/%s/.ssh/id_rsa', $deployData['ssh_user']),
            ],
        ];
        $sshProps = [
          'user'         => $deployData['ssh_user'],
          'keys'         => '',
          'forwardAgent' => false,
          'authMethods'  => 'publickey password',
          'deployTo'     => $deployData['deploy_to'],
          'repoUrl'      => $deployData['repo_url'],
        ];

        $question = new Question("<info>{$serverOptions['domain']['label']}</info> [<comment>{$serverOptions['domain']['helper']}</comment>]: ", $serverOptions['domain']['helper']);
        $sshProps['domain'] = $questionHelper->ask($input, $output, $question);

        foreach ($sshOptions as $key => $property) {
            $question = new Question("<info>{$property['label']}</info> [<comment>{$property['helper']}</comment>]: ", $property['helper']);

            if (isset($property['autocomplete'])) {
                $question->setAutocompleterValues($property['autocomplete']);
            }

            $sshProps[$key] = $questionHelper->ask($input, $output, $question);
        }

        return $sshProps;
    }
protected function configureSSH(InputInterface $input, OutputInterface $output, QuestionHelper $questionHelper, $deployData)
    {
        $serverOptions = [
            'domain' => [
                'helper' => $deployData['ssh_user'],
                'label'  => 'Domain name',
            ],
        ];
        $sshOptions = [
            'forwardAgent' => [
                'label'  => 'SSH forward agent',
                'helper' => 'false',
            ],
            'authMethods' => [
                'label'  => 'SSH auth method',
                'helper' => 'publickey password',
            ],
            'keys' => [
                'label'  => 'Remote SSH key',
                'helper' => sprintf('/home/%s/.ssh/id_rsa', $deployData['ssh_user']),
            ],
        ];
        $sshProps = [
          'user'         => $deployData['ssh_user'],
          'keys'         => '',
          'forwardAgent' => false,
          'authMethods'  => 'publickey password',
          'deployTo'     => $deployData['deploy_to'],
          'repoUrl'      => $deployData['repo_url'],
        ];

        $question = new Question("<info>{$serverOptions['domain']['label']}</info> [<comment>{$serverOptions['domain']['helper']}</comment>]: ", $serverOptions['domain']['helper']);
        $sshProps['domain'] = $questionHelper->ask($input, $output, $question);

        foreach ($sshOptions as $key => $property) {
            $question = new Question("<info>{$property['label']}</info> [<comment>{$property['helper']}</comment>]: ", $property['helper']);

            if (isset($property['autocomplete'])) {
                $question->setAutocompleterValues($property['autocomplete']);
            }

            $sshProps[$key] = $questionHelper->ask($input, $output, $question);
        }

        return $sshProps;
    }
protected function configureSSH ( InputInterface $ input , OutputInterface $ output , QuestionHelper $ questionHelper , $ deployData ) { $ serverOptions = [ 'domain' => [ 'helper' => $ deployData [ 'ssh_user' ] , 'label' => 'Domain name' , ] , ] ; $ sshOptions = [ 'forwardAgent' => [ 'label' => 'SSH forward agent' , 'helper' => 'false' , ] , 'authMethods' => [ 'label' => 'SSH auth method' , 'helper' => 'publickey password' , ] , 'keys' => [ 'label' => 'Remote SSH key' , 'helper' => sprintf ( '/home/%s/.ssh/id_rsa' , $ deployData [ 'ssh_user' ] ) , ] , ] ; $ sshProps = [ 'user' => $ deployData [ 'ssh_user' ] , 'keys' => '' , 'forwardAgent' => false , 'authMethods' => 'publickey password' , 'deployTo' => $ deployData [ 'deploy_to' ] , 'repoUrl' => $ deployData [ 'repo_url' ] , ] ; $ question = new Question ( "<info>{$serverOptions['domain']['label']}</info> [<comment>{$serverOptions['domain']['helper']}</comment>]: " , $ serverOptions [ 'domain' ] [ 'helper' ] ) ; $ sshProps [ 'domain' ] = $ questionHelper -> ask ( $ input , $ output , $ question ) ; foreach ( $ sshOptions as $ key => $ property ) { $ question = new Question ( "<info>{$property['label']}</info> [<comment>{$property['helper']}</comment>]: " , $ property [ 'helper' ] ) ; if ( isset ( $ property [ 'autocomplete' ] ) ) { $ question -> setAutocompleterValues ( $ property [ 'autocomplete' ] ) ; } $ sshProps [ $ key ] = $ questionHelper -> ask ( $ input , $ output , $ question ) ; } return $ sshProps ; }
Configure SSH options for production staging.

@param InputInterface  $input
@param OutputInterface $output
@param QuestionHelper  $questionHelper
@param array           $deployData

@return array The production staging configuration
Configure SSH options for production staging .