SSH (Secure SHell) is a network protocol that allows you to connect to a remote server and execute commands on it, download files. The key feature is encryption of transmitted information. By default, command interpreter bash is implemented on hosting.
1. Information for connection
2. Working with hosting using Midnight Commander
3. Work with hosting from command line:
You can get information for connecting to the server via SSH and SFTP in the FTP and SSH section of the hosting control panel.

For connection with the hosting server via SSH, install ssh-client on your computer. To upload files on hosting use SFTP client.
If the message «cannot allocate memory» appears when connecting via SSH, this means that all the memory available for your plan is occupied on your hosting. To free it up, you can temporarily stop the web server and disable the tasks of the task scheduler in the Web server management (Управление веб-сервером) section of the hosting control panel. We also recommend that you read the Using Hosting Resources article.
Midnight Commander is a two-panel file manager. It has a built-in text editor.
.png)
To run Midnight Commander connect to hosting via SSH and enter command
mc
Basic hot keys:
To get help information on the command you are interested in, type the following in the command line:
man command
to finish work with the help click on «q».
The brief note about the command may be received by running it with setting --help or -h:
command --help
Display current directory:
pwd
Go to user home directory:
cd
Go to tmp directory located in the current directory:
cd tmp
Go to catalog by full path /home/login/sitename.ru/docs (root catalog of website name.ru):
cd /home/login/sitename.ru/docs
Go to parent directory (on a higher level):
cd ..
Go to previous directory:
cd -
Creation and deletion of files and directories.
Create new directory foo in the current directory:
mkdir foo
Create structure of directories foo/bar/baz in the current directory:
mkdir -p foo/bar/baz
Create directory foo in the current directory. The directory shall be empty:
rmdir foo
Delete directory foo with all files and subdirectories:
rm -rf foo
Create blank file foo:
touch foo
Deleted file foo:
rm foo
Viewing and editing file contents
View the contents of the text file (log-file of the website) (Click «q» to exit):
less /var/log/sitename.ru.access_log
Open file foo in text editor:
mcedit foo
Copy file foo into file bar:
cp foo bar
Copy the contents of directory "old" into directory "new":
cp old/* new/
Rename file foo to file bar:
mv foo bar
Move file foo to existing directory bar under baz name:
mv foo bar/baz
Recommended access rights on hosting for files 644 (rw-rw-rw-), for directories 755 (rwxr-xr-x).
Make file foo executable:
chmod 755 foo
Make file foo read-only:
chmod 444 foo
Changing access rights for all directories, contained in directory foo on 755:
find foo -type d -exec chmod 755 {} \;
Changing access rights for all directories, contained in directory foo on 644:
find foo -type f -exec chmod 644 {} \;
Show information about processes in real time (Press «q» to exit):
top
Show detailed information about all processes in progress:
ps auxww
Finish process work by its process identifier (PID) 1234:
kill 1234
Finish process work by its name:
killall apache2
Create archive of docs directory:
tar -czf archive.tar.gz docs
Unpack archive.tar.gz:
tar -xzf archive.tgz
Unpack archive.zip:
unzip archive.zip
Unpack archive.rar:
unrar x archive.rar
Unpack archive.gz:
gunzip archive.gz
Among website files find those containing text «login.mysql» (server address to access database):
grep -R "login.mysql" sitename.ru/docs
Find in the current directory and subdirectories files index.php:
find . -name index.php