{"id":109,"date":"2009-03-02T00:28:51","date_gmt":"2009-03-01T22:28:51","guid":{"rendered":"http:\/\/www.shukko.com\/x3\/?p=109"},"modified":"2009-03-02T00:28:51","modified_gmt":"2009-03-01T22:28:51","slug":"make-ssh-connections-with-php","status":"publish","type":"post","link":"https:\/\/www.shukko.com\/x3\/2009\/03\/02\/make-ssh-connections-with-php\/","title":{"rendered":"Make SSH connections with PHP"},"content":{"rendered":"<p>nasil yaptim<\/p>\n<p>Make SSH connections with PHP<\/p>\n<p>libssh2<\/p>\n<p>Now we need libssh2 from sourcefourge. We have to compile this, but no worries, this is all you need to do:<\/p>\n<p>cd \/usr\/src<br \/>\nwget http:\/\/surfnet.dl.sourceforge.net\/sourceforge\/libssh2\/libssh2-0.14.tar.gz<br \/>\ntar -zxvf libssh2-0.14.tar.gz<br \/>\ncd libssh2-0.14\/<br \/>\n.\/configure<br \/>\nmake all install<\/p>\n<p>sonra<\/p>\n<p>locate ssh2.so<\/p>\n<p>sonra<\/p>\n<p>onu usr\/local\/lib altina kopyala<\/p>\n<p>sonra<\/p>\n<p>php.ini de extension diri degistir \/usr\/local\/lib olarak<\/p>\n<p>sonr aoldu bitti<\/p>\n<p>Installation<br \/>\nssh2.so<\/p>\n<p>Next we need to link libssh &amp; PHP together. There&#8217;s a PECL module for this so let&#8217;s install using:<\/p>\n<p>pecl install -f ssh2<\/p>\n<p>The -f makes sure ssh2 is installed even though there&#8217;s not a stable candidate. You could also use the package name: ssh2-beta to overrule this.<\/p>\n<p>Now you need to make sure our new ssh2.so module is loaded by PHP. Edit your php.ini file (for CLI utitilies: \/etc\/php5\/cli\/php.ini, for Apache utilities \/etc\/php5\/apache2\/php.ini)<\/p>\n<p>extension=ssh2.so<\/p>\n<p>It should be placed beneath the: &#8220;Dynamic Extensions&#8221; section somewhere around line 515.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>nasil yaptim Make SSH connections with PHP libssh2 Now we need libssh2 from sourcefourge. We have to compile this, but no worries, this is all you need to do: cd \/usr\/src wget http:\/\/surfnet.dl.sourceforge.net\/sourceforge\/libssh2\/libssh2-0.14.tar.gz tar -zxvf libssh2-0.14.tar.gz cd libssh2-0.14\/ .\/configure make all install sonra locate ssh2.so sonra onu usr\/local\/lib altina kopyala sonra php.ini de extension diri [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-109","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/comments?post=109"}],"version-history":[{"count":1,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/109\/revisions"}],"predecessor-version":[{"id":110,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/109\/revisions\/110"}],"wp:attachment":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/media?parent=109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/categories?post=109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/tags?post=109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}