As you already know, the new Servage control panel offers some features which were not in the old control panel. One of these features is SSH.
SSH used the right way, is a very powerful tool which can help you to administrate your applications and files! For example, via SSH you can access the server terminal and run many commands which are otherwise not available. Using these commands a user can get host of information regarding their account and the server. These information would be impossible to get using control panel. You can perform almost all tasks related to your account via SSH. Although SSH is not GUI based it does offer a faster and more efficient way to doing multiple or single tasks.
However, Servage strongly advice you to exercise caution when using SSH. Any incorrect command can cause file loss, etc which is irreversible. Always backup files before editing important files. Also commands like rm -rf need to be used with extra caution as they delete all files/folders forcefully without warning! In case of any doubt please check with your programmer or contact our 24/7 support.
Here are some hints and tips about what to do with your SSH access:
- To get filesize of files and total usage of disk space of a folder:
du -h –max-depth=1The above command will give list of diskusage filewise and also the total space used by that folder - TO unzip a zipfile:
unzip <filename.zip>
This will uncompress all contents of filename.zip in the current folder. - Extracting a tar archive:
tar -xvf mystuff.tar
This will uncompress all contents of mystuff.tar in the current folder. - Compressing or uncompressing files –
To create a tar archive:
tar -cvf mystuff.tar mystuff/
This will compress all contents of mystuff/ and create mystuff.tar archive file. - You can also create and restore a database archive via SSH:
To restore an database archive to a new blank database-
mysql -h <db server hostname or ip> -u db_user -p db_name < db_backup.sql
mysql -h 04.mysql.servage.net -u 1004525_xe65677 -p 1004525-kerie1 < backup_2018-07-31-1824.sql - To create a database backup –
mysqldump -h <db server hostname or ip> -u db_user -p db_name > db_backup.sql
mysqldump -h 04.mysql.servage.net -u 1004525_xe677 -p 1004525-ker1 > backup_2018-07-31-14.sql - To change ownerships of a file/folder:
chown [OPTION] [OWNER][:[GROUP]] FILE
eg: chown 1004525:wwwuser test.txtThe above command will change ownership of file test.txt to 1004525:wwwuser. This operation can only be performed via SSH and not via control panel > file manager - Change all files in a directory recursively
chown [OPTION] [OWNER][:[GROUP]] [DIR] If you need all files within a directory changed to the same owner or group, you will want to use the -R, or recursive option. This saves time over doing each one separately. Be warned that this will change all files and directories within the named directory including the named directory.# chown -R test:test images
Last but not least, how exactly can you use SSH in your Servage control panel? First of all, you need a SSH client. You can e.g. download download putty.exe or ssh client software freely over the internet and user that to access SSH terminal. The SSH access details for your account are given in the Servage control panel. This HELPDESK POST shows you where to find your SSH log in details.
No comments yet (leave a comment)