What are FTP and SSH? The most detailed and understandable guide for beginners
Main chat
A chat for vibe coders: news, guides, live cases, marketplace, and finding executors.
Imagine that you have an apartment (your server on the Internet), and you need to constantly put things in there (your site files or bot), change furniture (code), and sometimes check if everything is OK. For this purpose there are special "doors and keys" - protocols FTP and SSH.
In this article, we’re going to break it down in as simple words as possible, as if explaining it to a friend who has never worked with servers before. Without complex jargon, with life examples and step-by-step instructions.
1. What is FTP? (File Transfer Protocol)
**FTP is an old but very simple way to transfer files to a server.
It appeared in 1971, before the invention of the modern Internet. Imagine a mailbox where you can put a letter or pick it up. FTP works in much the same way.
What does it look like in practice:
- You open a program (for example, FileZilla).
- Enter the server address, login and password.
- You see two panels: on the left, your files on your computer, on the right, the files on the server.
- Drag files with the mouse - they are downloaded or downloaded.
** Plus FTP:**
- Very simple
- Quickly mastered
- Supported by almost all hosting services
Huge downsides (why it's hardly used):
- Everything is transmitted in open text, like a postcard that anyone can read on the way.
- Login, password and all files can be intercepted.
- Easy to crack.
Conclusion: FTP can only be used in two ways:
- On the local network within the company (where no one can connect).
- For very old projects, where it does not work otherwise.
In 2026, we're using *protected options for normal operation.
2. What is SSH? (Secure Shell)
*SSH is a secure "protected shell". It’s like a secret tunnel between your computer and your server.
Through SSH, you can:
- Connect to the server and work in the command line (as if sitting right behind the server).
- Transferring files is safe.
- Run programs on the server.
- Configure the server remotely.
The main advantage is ** everything is encrypted. Even if someone intercepts your traffic, they will only see the “porridge” of the symbols.
SSH operates on 22 port (standard).
3.SFTP and SCP are FTP safe brothers
- **SFTP (SSH File Transfer Protocol) is an FTP, but inside a secure SSH tunnel. The most convenient option for most people.
- SCP (Secure Copy) is an easier way to quickly copy files through the command line.
Most modern programs (FileZilla, WinSCP) support **SFTP.
4. Public and private keys – how it works (simple analogy)
This is the most important and slightly difficult part. Let's take an example.
Imagine what you have:
- **Very complex lock (public key) - you can give out copies of this lock to anyone.
- The only key to this lock is the one you have.
Anyone who has a lock (public key) can close the box. It can only be opened by the owner of the private key.
** Important rules:**
- Don't ever give a private key to anyone.
- If someone steals your private key, they can access the server.
- The public key can be inserted on as many servers as you like.
5. Step-by-step instructions: how to create keys
On Windows:
- Press
Win + Sand enterPowerShell. - Insert the command:
ssh-keygen -t ed25519 -C "yourname@vibecode.ru"
- Press Enter several times (or come up with a good passphrase.).
On macOS and Linux:
Open the terminal and do:
ssh-keygen -t ed25519 -C "yourname@vibecode.ru"
The recommended *Ed25519 is modern, fast and very reliable.
After creating the keys, you will receive two files:
id_ed25519- private (keep as the apple of your eye)id_ed25519.pub- Public
6. How to add a public key to the server
The easiest way is:
# From your computer.
ssh-copy-id username@your-server-ip
Or by hand:
- Go to the server with the password.
- Follow the commands:
mkdir -p ~/.ssh
chmod 700 ~/.ssh
cat >> ~/.ssh/authorized_keys
(Insert the contents of your .pub file)
chmod 600 ~/.ssh/authorized_keys
7. How to connect conveniently
Through the program (recommended for beginners):
- *FileZilla (free, works everywhere)
- WinSCP (especially good for Windows)
- ** Cyberduck**
Through the terminal:
ssh username@your-server-ip
You can create a convenient configuration file ~/.ssh/config:
Host myserver
HostName 123.456.789.012
User damir
IdentityFile ~/.ssh/id_ed25519
Port 22
Then the connection will be simple: ssh myserver
8. Best safety practices
- *Turn off your password completely..
- Use a long passphrase on your private key.
- Create a separate user for each project.
- Update the server system regularly.
- Install Fail2Ban (excess protection).
- Do not use port 22 (you can change it).
- Make backup copies of keys in encrypted form.
9. Frequent problems and solutions
- "Permission denied (publickey)" - key not added or incorrect rights.
- Connection refused: The SSH server does not start or blocks the firewall.
- The key does not work after the reboot - a problem with the rights to the
.sshfolder. - Try the
ed25519algorithm instead of RSA.
10. Comparative table
| Возможность | Обычный FTP | SFTP (SSH) | SCP |
|---|---|---|---|
| Безопасность | Очень низкая | Очень высокая | Очень высокая |
| Удобство для файлов | Отличное | Отличное | Среднее |
| Скорость | Высокая | Высокая | Очень высокая |
| Работа через командную строку | Нет | Да | Да |
| Рекомендация в 2026 | Не использовать | Основной выбор | Для скриптов |
Conclusion
Now you understand what FTP, SSH, SFTP, public and private keys are.
Briefly remember:
- FTP is old and dangerous.
- SSH is a modern and secure way of access.
- Keys are the most reliable method of login (better than passwords).
Start small: generate keys, connect via FileZilla via SFTP, turn off the password. This is one of the most important skills for anyone who works with websites, bots or apps.
If something does not work, write in the comments, we will analyze your specific situation.