WIKI

Notes

View on GitHub

Protocols

by Abderrahmane

Telnet protocol :

telnet [hostname] [port]
# [hostname]: The address of the target server.
# [port]: The port number (default is 23 for Telnet).

Telnet is a network protocol used to provide a bidirectional interactive text-oriented communication facility using a virtual terminal connection.

Here are the key principles of the Telnet protocol:

Due to its lack of security features, Telnet has largely been replaced by more secure protocols like SSH (Secure Shell) for remote access needs in most practical applications. However, Telnet is still used in some contexts, particularly for troubleshooting and accessing legacy systems.

SSH protocol :

Like Telnet, SSH is used for accessing and managing systems remotely. However, it also provides additional capabilities like secure file transfer (using SFTP or SCP) and the ability to forward arbitrary TCP ports and X11 connections.

Same principles as Telnet

SSH also operates on a client-server model but adds security layers for authentication (like public key authentication) and encryption. It supports various encryption algorithms.

Basic SSH Commands

  1. Connect to a Server
ssh [username]@[hostname]
  1. Connect Using a Specific Port
ssh -p [port] [username]@[hostname]
  1. Execute a Command on a Remote Server
ssh [username]@[hostname] [command]
  1. SSH Key Generation
ssh-keyge
  1. Copy SSH Key to a Server
ssh-copy-id [username]@[hostname]
  1. SSH with Custom Private Key
ssh -i [path/to/private_key] [username]@[hostname]