Skip to content

A fully custom SSH client developed from scratch in C++, implementing all aspects of the SSH protocol from the ground up using sockets, cryptographic primitives, POSIX threads, and raw terminal I/O.

License

Notifications You must be signed in to change notification settings

adsouza7/SSH-Client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom Multithreaded SSH Client

A fully custom SSH client developed from scratch in C++, implementing all aspects of the SSH protocol from the ground up using sockets, cryptographic primitives, POSIX threads, and raw terminal I/O.

Check out SSH-Client-Design.txt for an overview of the design

Features

  • Implements core SSH protocol (RFC 4253)
    • Algorithm Negotiation
    • Key Exchange
    • Encryption/Decryption
    • Secure Channel setup
    • Interactive shell session
  • POSIX sockets for TCP/IP communication over port 22
  • Cryptographic operations using OpenSSL 3.0
  • Multithreaded architecture with POSIX threads to ensure a smooth user experience
  • Raw terminal mode for seamless interactive shell experience
  • Packet-level data management
  • Minimal external dependencies

Supported Algorithms

Key Exchange (KEX)

  • curve25519-sha256
  • diffie-hellman-group14-sha256

Public Key Algorithms

  • ssh-ed25519
  • rsa-sha2-256

Encryption

  • aes128-ctr
  • aes256-ctr

Message Authentication Code (MAC)

  • hmac-sha2-256
  • hmac-sha1

Compression

  • none

Demo

Connecting to a Remote Terminal

Connection 1 Connection 2

Disconnecting from a Remote Terminal

Disconnection

Wireshark Capture

Wireshark

Build and Run

Dependencies

  • g++ with C++20 support
  • OpenSSL 3.0 (libcrypto)
  • POSIX threads (libpthread)

Install Dependencies

sudo apt install -y build-essential libssl-dev

Build

# Clone the repository
git clone https://github.com/adsouza7/SSH-Client.git
cd SSH-Client/

# Normal build
make

# Verbose build (with logs)
make verbose

Run

# Run this command
./ssh-client <username>@<hostname>

References

About

A fully custom SSH client developed from scratch in C++, implementing all aspects of the SSH protocol from the ground up using sockets, cryptographic primitives, POSIX threads, and raw terminal I/O.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published