>_ Manage Your Server at Your Fingertips
SSH (Secure Shell) commands, the most basic building block of Linux server management, have been gathered in a single guide with Eka Sunucu expertise. From file permissions to network analysis, from system monitoring to security, all the codes you need are here.
Whether AlmaLinux, whether Ubuntu use; This guide was prepared according to 2026's modern DevOps standards.
| Komut | Description |
|---|---|
| ssh [email protected] | Standard server connection (Default 22 port). |
| ssh -p 2222 root@ip | Connecting via a different port (Ex: 2222). |
| ssh-keygen -t ed25519 | 2026 Standard: New generation, secure SSH key generation. (Recommended instead of RSA). |
| ssh-copy-id root@ip | It automatically copies the created public key to the server (for password-free login). |
| exit | Logs out and logs out. |
screen or tmux use it. screen -S islem_adi Open a new window with CTRL+A+D Put it in the background with . | Komut | Description |
|---|---|
| ls -lah | Lists all files (including hidden ones) with their file sizes. |
| cd /var/www | Goes to the specified directory. cd .. goes to a higher directory. |
| cp -r folder new_folder | Copies a folder with its contents. |
| mv file.txt new.txt | Changes the file name or moves the file. |
| rm -rf klasor | Attention: It deletes the folder and its contents without prompting. |
| mkdir -p a/b/c | Creates nested folders. |
| pwd | Shows which directory you are currently in (Print Working Directory). |
| Komut | Description |
|---|---|
| chmod 755 klasor | Ideal permission for folders. Owner writes, others read/enter. |
| chmod 644 dosya.php | Ideal permission for files. The owner writes, others read. |
| chmod -R 755 klasor | Applies permission to the folder and everything below it (Recursive). |
| chown user:group dosya | Changes the owner and group of the file. |
| chown -R user:user /home | Batch changes the owner of all files under the directory. |
chmod 777 don't give it! This means anyone can write malicious code into that file. Linux Permissions Check out our article. | Komut | Description |
|---|---|
| htop | Colorful and interactive task manager. Best for CPU/RAM monitoring. |
| free -m | Shows RAM usage in MB. |
| df -h | Displays disk fullness in readable format (GB). |
| du -sh folder/ | Calculates the total size of the specified folder. |
| uptime | It shows how long the server has been open and the load average. |
| systemctl status nginx | It checks whether a service (eg: nginx) is running or not. |
| Komut | Description |
|---|---|
| ip addr show | Lists the server's IP addresses (used instead of ifconfig). |
| netstat -tulpn | It shows which ports are listened by which service. |
| ping google.com | Performs connection testing. |
| curl -I ekaservucu.com | It retrieves the header information of a website. |
| wget url_address | It is used to download files. |
| Komut | Description |
|---|---|
| tar -czvf yedek.tar.gz klasor | Compresses a folder in .tar.gz format (Ideal for Backup). |
| tar -xzvf dosya.tar.gz | Extracts the .tar.gz file. |
| zip -r archive.zip folder | Compresses the folder in .zip format. |
| unzip file.zip | Opens the .zip file. |
| Komut | Description |
|---|---|
| grep "error" log.txt | Searches for the word "error" in the file. |
| grep -r "config" /etc/ | Searches for words in all files in a folder (Recursive). |
| find / -name "file.txt" | It finds the file named "dosya.txt" in the entire system. |
| find . -type f -size +100M | Lists files larger than 100MB. |
| tail -f error.log | It monitors the log file live (streaming text). |
For SSH security /etc/ssh/sshd_config You need to edit the file. Things to do in 2026 standards:
Port 22 instead ofPort 2288 (Example) PermitRootLogin yes instead ofPermitRootLogin no
PasswordAuthentication yes instead ofPasswordAuthentication no
Don't forget to restart the service after editing:
sudo systemctl restart sshd
For more security details To our SELinux Guide you can look.
Questions about using SSH.
Don't want to deal with complex commands? With Eka Sunucu's "Managed Server" services, leave the technical details to us and you can focus on your business.