<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>ssh on Tutes Club</title><link>https://tutes.in/tag/ssh/</link><description>Recent content in ssh on Tutes Club</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 12 Feb 2019 18:01:40 +0000</lastBuildDate><atom:link href="https://tutes.in/tag/ssh/index.xml" rel="self" type="application/rss+xml"/><item><title>How to fix Composer should be invoked via the CLI version of PHP, not the cgi-fcgi SAPI error in SSH?</title><link>https://tutes.in/how-to-fix-composer-should-be-invoked-via-the-cli-version-of-php-not-the-cgi-fcgi-sapi-error-in-ssh/</link><pubDate>Tue, 12 Feb 2019 17:58:38 +0000</pubDate><guid>https://tutes.in/how-to-fix-composer-should-be-invoked-via-the-cli-version-of-php-not-the-cgi-fcgi-sapi-error-in-ssh/</guid><description>&lt;p&gt;Put this in your bash profile and run &lt;strong&gt;source ~/.bashrc&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;alias&lt;/span&gt; &lt;span class="nv"&gt;composer&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;/opt/cpanel/ea-php71/root/usr/bin/php /opt/cpanel/composer/bin/composer&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;p&gt;As Composer is now available via WHM you can use this to find it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;which composer
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This returned path “&lt;strong&gt;/opt/cpanel/composer/bin/composer&lt;/strong&gt;” for me. If this returns nothing then disregard the rest of this answer, as Composer is not available to you at system level.&lt;/p&gt;
&lt;p&gt;You can now use &lt;code&gt;php-cli&lt;/code&gt; to call this with Composer’s absolute path:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;php-cli /opt/cpanel/composer/bin/composer install
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;php-cli /opt/cpanel/composer/bin/composer update
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;php-cli /opt/cpanel/composer/bin/composer require whatever/example
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You may however need to alias &lt;code&gt;php-cli&lt;/code&gt; if your system claims this isn’t found. It very much depends how PHP has been deployed on the WHM server. &lt;a href="https://tutes.in/fix-magento-2-php-cli-error-on-cpanel-or-other-hostings/"&gt;Learn how to fix PHP CLI error&lt;/a&gt;. You can do this by adding a user alias to the end of your “&lt;strong&gt;.bashrc&lt;/strong&gt;” or “&lt;strong&gt;.bash_profile&lt;/strong&gt;” file as follows:&lt;/p&gt;</description></item><item><title>How to edit default python version for a linux user?</title><link>https://tutes.in/how-to-edit-default-python-version-for-a-linux-user/</link><pubDate>Mon, 31 Dec 2018 10:53:46 +0000</pubDate><guid>https://tutes.in/how-to-edit-default-python-version-for-a-linux-user/</guid><description>&lt;p&gt;Edit the bash profile and add an alias using the following code&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ nano ~/.bashrc
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Put the following line of code in &lt;code&gt;.bashrc&lt;/code&gt; file and alter the python3.6 path as per your new installation&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;alias python=&amp;#39;/usr/local/bin/python3.6&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Use &lt;code&gt;CTRL x&lt;/code&gt; to exit and save&lt;br&gt;
After that you need to reload the source, so use the following command and you are good to go.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ &lt;span class="nb"&gt;source&lt;/span&gt; ~/.bashrc
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>How to connect cpanel through SSH</title><link>https://tutes.in/how-to-connect-cpanel-through-ssh/</link><pubDate>Fri, 27 Jul 2018 11:21:20 +0000</pubDate><guid>https://tutes.in/how-to-connect-cpanel-through-ssh/</guid><description>&lt;p&gt;Following are the steps to connect to cpanel through SSH:-&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to your cpanel and create a public private key-pair,&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;under SSH access-&amp;gt;manage keys.&lt;/p&gt;
&lt;ol start="2"&gt;
&lt;li&gt;Under manage keys section, go on create a new key.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img loading="lazy" src="https://tutes.in/wp-content/uploads/2018/07/Capture1-300x119.jpg"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img loading="lazy" src="https://tutes.in/wp-content/uploads/2018/07/Capture3-300x134.jpg"&gt;&lt;/p&gt;
&lt;ol start="3"&gt;
&lt;li&gt;Create a key and give key name, key password, key type and key size.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img loading="lazy" src="https://tutes.in/wp-content/uploads/2018/07/Capture4-300x144.jpg"&gt;&lt;/p&gt;
&lt;p&gt;4.  Click on generate keys and it will look something like this.&lt;/p&gt;
&lt;p&gt;&lt;img loading="lazy" src="https://tutes.in/wp-content/uploads/2018/07/Capture5-300x144.jpg"&gt;&lt;/p&gt;
&lt;ol start="5"&gt;
&lt;li&gt;Go back and under public key  section ,&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;select your public key-&amp;gt;manage-&amp;gt;authorize key.&lt;/p&gt;</description></item><item><title>Linux commands for SSH</title><link>https://tutes.in/linux-commands-for-ssh/</link><pubDate>Fri, 27 Jul 2018 07:37:13 +0000</pubDate><guid>https://tutes.in/linux-commands-for-ssh/</guid><description>&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;tar&lt;/strong&gt;– to create archive files(.zip, .tar)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Syntax:&lt;br&gt;
tar [options] [archive-file] [file or directory to be archived]&lt;/p&gt;
&lt;p&gt;Options:&lt;br&gt;
-c : Creates Archive&lt;br&gt;
-x : Extract the archive&lt;br&gt;
-f : creates archive with given filename&lt;br&gt;
-t : displays or lists files in archived file&lt;br&gt;
-u : archives and adds to an existing archive file&lt;br&gt;
-v : Displays Verbose Information&lt;br&gt;
-A : Concatenates the archive files&lt;br&gt;
-z : zip, tells tar command that create tar file using gzip&lt;br&gt;
-j : filter archive tar file using tbzip&lt;br&gt;
-W : Verify a archive file&lt;br&gt;
-r : update or add file or directory in already existed .tar file&lt;/p&gt;</description></item><item><title>How to update Magento community edition using CLI</title><link>https://tutes.in/how-to-update-magento-community-edition-using-cli/</link><pubDate>Thu, 01 Feb 2018 12:15:16 +0000</pubDate><guid>https://tutes.in/how-to-update-magento-community-edition-using-cli/</guid><description>&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;composer require magento/product-community-edition 2.2.6 --no-update
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;composer update
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;rm -rf var/di var/generation var/cache var/view_preprocessed generated/*
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;php bin/magento cache:clean
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;php bin/magento cache:flush
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;php bin/magento setup:upgrade
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;php bin/magento setup:di:compile
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;php bin/magento indexer:reindex
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;php bin/magento deploy:mode:set production
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;if you receive any errors post installation, try this hard fix&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;rm -rf app/code/Magento/ var/* vendor/*
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;chmod &lt;span class="m"&gt;777&lt;/span&gt; -R *
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;composer update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; composer install
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;php -f bin/magento setup:static-content:deploy
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;find . -type d -exec chmod &lt;span class="m"&gt;775&lt;/span&gt; &lt;span class="o"&gt;{}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;find . -type f -exec chmod &lt;span class="m"&gt;660&lt;/span&gt; &lt;span class="o"&gt;{}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;chmod u+x bin/magento
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bin/magento maintenance:disable
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bin/magento cache:clean
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>How to Update Magento 2.1x to latest version via SSH</title><link>https://tutes.in/how-to-update-magento-2-1x-to-latest-version-via-ssh/</link><pubDate>Tue, 26 Sep 2017 03:37:59 +0000</pubDate><guid>https://tutes.in/how-to-update-magento-2-1x-to-latest-version-via-ssh/</guid><description>&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;composer require magento/product-community-edition 2.1.9 --no-update
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;composer update
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/*
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;php bin/magento cache:clean
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;php bin/magento cache:flush
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;php bin/magento setup:upgrade
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;php bin/magento setup:di:compile
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;php bin/magento setup:static-content:deploy
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;php bin/magento indexer:reindex
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item></channel></rss>