Want more timely Centmin Mod News Updates?
Become a Member

PHP-FPM Installing SSH2 on Centos 7

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by BamaStangGuy, Sep 22, 2014.

  1. BamaStangGuy

    BamaStangGuy Active Member

    668
    192
    43
    May 25, 2014
    Ratings:
    +272
    Local Time:
    10:15 AM
    I am trying to install SSH2 but running into the following issue

    Code:
    [root@cloud1 public]# pecl install ssh2
    Failed to download pecl/ssh2 within preferred state "stable", latest release is version 0.12, stability "beta", use "channel://pecl.php.net/ssh2-0.12" to install
    install failed
    [root@cloud1 public]# pecl install channel://pecl.php.net/ssh2-0.11.0
    downloading ssh2-0.11.0.tgz ...
    Starting to download ssh2-0.11.0.tgz (22,884 bytes)
    ........done: 22,884 bytes
    5 source files, building
    running: phpize
    Cannot find config.m4.
    Make sure that you run '/usr/local/bin/phpize' in the top level source directory of the module
    
    ERROR: `phpize' failed
    Any ideas?

     
  2. eva2000

    eva2000 Administrator Staff Member

    50,450
    11,658
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,077
    Local Time:
    1:15 AM
    Nginx 1.25.x
    MariaDB 10.x
  3. BamaStangGuy

    BamaStangGuy Active Member

    668
    192
    43
    May 25, 2014
    Ratings:
    +272
    Local Time:
    10:15 AM
  4. eva2000

    eva2000 Administrator Staff Member

    50,450
    11,658
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,077
    Local Time:
    1:15 AM
    Nginx 1.25.x
    MariaDB 10.x
    using would be at /root/.ssh but you'd have to create the directory as it doesn't exist on fresh installs until you generate your first keys

    Code:
    mkdir -p /root/.ssh
    chmod 600 /root/.ssh
     
  5. BamaStangGuy

    BamaStangGuy Active Member

    668
    192
    43
    May 25, 2014
    Ratings:
    +272
    Local Time:
    10:15 AM
  6. eva2000

    eva2000 Administrator Staff Member

    50,450
    11,658
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,077
    Local Time:
    1:15 AM
    Nginx 1.25.x
    MariaDB 10.x
    any errors ? don't use ssh2 for wordpress (??) so not sure

    did you check to see if /root/.ssh has the files ?

    edit: could be that php-fpm nginx user can't read the files as they'd be owned by root user/group.
     
    Last edited: Sep 22, 2014
  7. BamaStangGuy

    BamaStangGuy Active Member

    668
    192
    43
    May 25, 2014
    Ratings:
    +272
    Local Time:
    10:15 AM
    Don't guess there is a work around for that is there?
     
  8. eva2000

    eva2000 Administrator Staff Member

    50,450
    11,658
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,077
    Local Time:
    1:15 AM
    Nginx 1.25.x
    MariaDB 10.x
    yeah seems to be file permissions related.. here's an idea of what it entails Allowing secure WordPress Updates with SSH2 ยป KBeezie

    would have to change it for Centmin Mod Nginx directory paths..

    I'll take a look a bit later, in the mist of more Vultr testing :)

    edit: quick read it maybe enough to just specify a location within your domain's path above web root and make sure it has the right user/group permissions

    Code:
    mkdir -p /home/nginx/domains/domainname.com/.ssh
    chown -R nginx:nginx /home/nginx/domains/domainname.com/.ssh
    then when you generate the keys specify path /home/nginx/domains/domainname.com/.ssh

    then again for created keys
    Code:
    chown -R nginx:nginx /home/nginx/domains/domainname.com/.ssh
     
    Last edited: Sep 22, 2014