SSH in the terminal means Secure Shell.
It is a protocol used to securely connect from one computer to another over a network, most commonly to control a remote server through a command-line interface (the terminal).
What it’s used for
- Logging into remote servers
- Running commands on another machine
- Managing servers and cloud instances
- Transferring files securely (via SCP or SFTP)
Basic idea
You type an SSH command in your terminal, and it opens a secure, encrypted session to another computer.
Example
ssh user@server_address
user= username on the remote machineserver_address= IP address or domain name of the remote machine
Why it matters
- Encrypted (safe from eavesdropping)
- Replaces insecure methods like Telnet
- Standard tool in Linux, macOS, and developer workflows
Step-by-step example of using SSH
Step 1: Open a terminal
- Linux / macOS: Open Terminal
- Windows: Open PowerShell or Windows Terminal
Step 2: Make sure SSH is available
ssh -V
If SSH is installed, you will see a version number.
Step 3: Connect to a remote server (password login)
ssh username@server_ip
Example
ssh john@192.168.1.50
- The terminal tries to connect to the server.
- You may be asked to trust the host.
- Enter the user’s password.
- You are now logged into the remote machine.
Step 4: Run commands on the remote server
ls
pwd
uptime
Step 5: Exit the SSH session
exit
or press Ctrl + D
Step 6: Use SSH keys instead of passwords (Recommended)
Generate a key
ssh-keygen
- Private key:
~/.ssh/id_rsa - Public key:
~/.ssh/id_rsa.pub
Copy the public key to the server
ssh-copy-id username@server_ip
Log in using the key
ssh username@server_ip
Main applications of SSH
1. Remote login and server administration
- Administering Linux servers
- Managing cloud servers
- Controlling servers remotely
2. Secure remote command execution
ssh user@server "df -h"
3. Secure file transfer
scp file.txt user@server:/home/user/
sftp user@server
4. Tunneling and port forwarding
Used for secure access to internal services.
5. Version control access
Used with GitHub, GitLab, Bitbucket.
6. Automation and scripting
ssh user@server "sudo apt update && sudo apt upgrade -y"
Git + SSH
git clone git@github.com:username/project.git
Automation with SSH
ssh user@server "uptime"
Summary
- Secure remote access
- Secure file transfer
- Automation and deployment
- Encrypted tunneling
- Authentication for developer tools