ACCESS DISTANT WEB SERVER THROUGH SSH

From Windows: cmd pront

From any directory use the command: ssh ssh://sshadress

 

In my case: ssh ssh://cellucomvi@ssh.cluster003.hosting.ovh.net:22/

You then need to enter the password to access the secure shell server

 

 

USEFULL COMMANDS

Restore and retrieve zip backup in ssh or local

unzip: via ssh
unzip your-file.zip
compress folder:
zip -r drupal_papierlogik.zip drupal_papierlogik
change File permissions:
chmod -R 755 drupal_papierlogik/sites/default
remove folder and content:
rm -rf monFichier

find a file in a folder and sub_folders content

find . -name “composer.phar” 2>/dev/null      ( replqce composer.phqr zith your searched file name)

 

Application example; when reinstalling drupal from a backup, there can be issues with composer.

Using the find command enables to locate composer.phar file through an answer like this:

cellucomvi@ssh01.cluster003.gra.hosting.ovh.net (php/8.2/production/stable64) ~ $ find . -name “composer.phar” 2>/dev/null

./¨/bin/composer.phar

./.php/composer/composer.phar

We can then use this file to reinstall composer through a few steps:

1- remove the current vendor folder from root folder (in my cas drual_papierlogik)

rm -rf vendor/

2- Run Composer to install dependencies

php /homez.916/cellucomvi/.php/composer/composer.phar install

3- Clear Drupal’s Caches using Drush (if available):

At first, check  if drush is available  from your root:
You should get sth like: Drush Commandline Tool 11.6.0

vendor/bin/drush –version

Then, depending on the result

  • If Drush is available, run the cache rebuild command:
    ./vendor/bin/drush cr

  • If Drush is still not available or gives an error, then use the web-based method: https://papierloglogik.com/core/rebuild.php.

 

Dowload PUTTY, an Open-Source and ARNm-Free SSH Terminal

h   (:::ssh.cluster003.hosting.ovh.net ( ( 5Note: Windows Terminal (Recommended for Windows 10/11): Windows now has a built-in OpenSSH client. You can just open Command Prompt (cmd) or PowerShell and use the ssh command directly. This is much simpler than PuTTY if you’re on a modern Windows version. 

However, the cmd prompt is not much userfriendly and will not store you ssh settings between 2 sessions. For this, Putty (or equivalent) is essential if you still run on Win7 with no native ssh client, or earlier versions, and it is more convenient as you just setup your ssh client once in the app and it will be there again next time.

Download Putty on the Putty website dowload page: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

USAGE:
– Open the App and enter your server host Name  ( e.g. ssh.cluster003.hosting.ovh.net )

– This will open a prompt asking for your userName ( e.g. cellucomvi )

– Last It will Ask for your password ( e.g; HVOlaposteInv )