Published: 14.08.2026
SSH is the standard way to control a Linux server from your computer. It opens a secure text session where you can install software, edit files and read logs. It sounds technical, but a few basics will take you far.

What you need
- The IP address or name of the server.
- A user name, often a regular user created for you or root on a new server.
- A password or, better, an SSH key.
- An SSH client: it is built into Linux, macOS and modern Windows; PuTTY is a popular alternative.
The first connection
Open a terminal and type the command ssh user@server-address. The first time, the client shows a fingerprint of the server and asks you to confirm. Check it against the one in your provider's panel if it is shown there, and then accept. Enter the password, and you will see the prompt of the remote machine.
Basic commands
- pwd shows the current folder.
- ls lists files, and ls -la shows details and hidden files.
- cd folder changes the folder; cd .. goes one level up.
- cat file shows a file, and nano file opens a simple editor.
- cp, mv and rm copy, move and delete; be careful with rm.
- df -h shows disk space and free -h shows memory.
- top or htop shows running processes.
- sudo command runs a command with administrator rights.
Using keys instead of passwords
Create a key pair on your computer with ssh-keygen, then copy the public key to the server with ssh-copy-id. After checking that key login works, disable password login in the SSH configuration. Keys cannot be guessed by bots and make the server much safer.
Transferring files
Use scp or sftp to copy files between your computer and the server. For large folders, rsync copies only the differences and can resume after a break. Graphical clients also exist for people who prefer windows to commands.
Staying safe
- Do not work as root all the time; create a regular user and use sudo.
- Think before you press Enter on commands copied from the internet.
- Make a backup or snapshot before big changes.
- Keep a second session open when you change SSH settings, so you do not lock yourself out.
- Update the system regularly and install a firewall.
Useful habits
Use the Tab key to complete names, the up arrow to repeat the previous command and Ctrl+C to stop a running command. A terminal multiplexer such as tmux lets a task keep running after you disconnect. Add short names for your servers to the SSH config file so you can connect with a simple word.
Troubleshooting
- Connection refused or timed out: the server is off, the address is wrong, or a firewall blocks the port.
- Permission denied: check the user name, the password or the key and its file permissions.
- Host key changed warning: the server was rebuilt or someone is intercepting; verify before you continue.
Frequently asked questions
Is SSH only for experts? No. A few commands cover most tasks, and you can learn them in a day.
Can I use SSH on Windows? Yes, the terminal has an SSH client built in.
Should I change the SSH port? It reduces noise in logs but is not a security measure by itself. Keys and a firewall matter more.