Remote Access
Securely Connecting and Transferring Files

Growing in DevOps, together! ๐ค | Associate Software Engineer at Tech Mahindra | Enthusiastic about automation, cloud solutions, and efficient software delivery. | Let's connect, collaborate, and learn from each other!
Remote access allows you to securely connect to, transfer files, and synchronize data between computers over a network.
What is Secure Shell (SSH)?
SSH (Secure Shell) is a cryptographic network protocol used for securely accessing and managing remote computers over an untrusted network (like the Internet). It provides encrypted communication, protecting sensitive data like passwords and commands from being intercepted.
๐ Key Features:
โ Secure remote login to servers
โ Encrypted data transmission
โ Remote command execution
โ File transfer via SCP and SFTP
โ Port forwarding and tunneling
How SSH Works?
SSH operates using the client-server model, where:
The SSH client (your computer) initiates a connection.
The SSH server (remote machine) listens for connections.
Both use public-key cryptography to establish an encrypted session.
๐ Authentication Methods:
Password-based authentication (less secure)
Public key authentication (more secure โ uses SSH keys)1.SSH (Secure Shell)
Why it is called Secure Shell?
SSH (Secure Shell) is called Secure Shell because it provides a secure way to access and manage remote systems over an encrypted network connection. It replaces older, insecure protocols like Telnet, rlogin, and FTP, which transmit data (including passwords) in plaintext, making them vulnerable to interception and attacks.
Why is SSH Secure?
Encryption: SSH encrypts all data transmitted between the client and server, preventing eavesdropping and man-in-the-middle attacks.
Authentication: Supports password-based and key-based authentication, ensuring that only authorized users can access the system.
Integrity Protection: Uses cryptographic hash functions to detect tampering with data during transmission.
Forwarding and Tunneling: Supports secure tunneling for protocols like SCP and SFTP for secure file transfers.
Note - The default port for SSH client connections is 22. We can change the default port and use one
between 1024 and 32,767
Installation
Install OpenSSH Client and Server
sudo apt update sudo apt install openssh-client openssh-server -yCheck SSH Service Status
sudo systemctl status ssh
Commonly used ssh commands
Connect to a Remote Server
ssh user@remote_hostssh john@192.168.1.100This logs into 192.168.1.100 as user john.
Specify a Custom Port (Default is 22)
ssh -p 2222 user@remote_hostUse an SSH Key Instead of a Password
ssh -i /path/to/private_key user@remote_hostRun a Command on the Remote Server
ssh user@remote_host "command"ssh john@server.com "ls -l /home/john"Copy Files Securely with
scp(SSH-Based File Transfer)scp file.txt user@remote_host:/remote/path/



