Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

adsouza7/SSH-Client

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

122 Commits
122 Commits
 
 
 
 
 
 
 
 
 
 
 
 

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

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.