Welcome to Centmin Mod Community
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

    475
    137
    43
    May 25, 2014
    Ratings:
    +181
    Local Time:
    4:26 PM
    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

    31,027
    6,928
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,434
    Local Time:
    8:26 AM
    Nginx 1.13.x
    MariaDB 5.5
  3. BamaStangGuy

    BamaStangGuy Active Member

    475
    137
    43
    May 25, 2014
    Ratings:
    +181
    Local Time:
    4:26 PM
  4. eva2000

    eva2000 Administrator Staff Member

    31,027
    6,928
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,434
    Local Time:
    8:26 AM
    Nginx 1.13.x
    MariaDB 5.5
    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

    475
    137
    43
    May 25, 2014
    Ratings:
    +181
    Local Time:
    4:26 PM
  6. eva2000

    eva2000 Administrator Staff Member

    31,027
    6,928
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,434
    Local Time:
    8:26 AM
    Nginx 1.13.x
    MariaDB 5.5
    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

    475
    137
    43
    May 25, 2014
    Ratings:
    +181
    Local Time:
    4:26 PM
    Don't guess there is a work around for that is there?
     
  8. eva2000

    eva2000 Administrator Staff Member

    31,027
    6,928
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,434
    Local Time:
    8:26 AM
    Nginx 1.13.x
    MariaDB 5.5
    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
    • Like Like x 1