Skip to content

pedrohenrikle/gSSH

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gSSH

gSSH is a remote connection tool built in Go, leveraging gRPC to streamline secure server-client communication. It features TLS/SSL encryption for secure data transmission, ensuring confidentiality and integrity of interactions.

Features

  • Secure Communication: TLS/SSL encryption to ensure data confidentiality;
  • Remote Access: Execute commands remotely across servers;
  • Built with gRPC: Leveraging gRPC for efficient and scalable remote communication;

Getting Started

Prerequisites

  • Go 1.18+
  • OpenSSL (for generating certificates)

Installation

  1. Clone the repository:

    git clone https://github.com/pedrohenrikle/gSSH.git
    cd gSSH
  2. Generate TLS/SSL certificates (for development):

    mkdir -p cert
    openssl req -x509 -newkey rsa:4096 -keyout cert/server.key -out cert/server.crt -days 365 -nodes -subj "/CN=localhost"
  3. Install dependencies:

    go mod download
  4. Setup environment variables:

    touch .env

    And follow the example on .env example.

Running the Server

go run cmd/server/server.go --port=<port>

or build as:

mkdir -p out
go build -o out/server cmd/server/server.go
./out/server

Running the Client

go run cmd/client/client.go --id=<session_id> --port=<port>

or build as:

mkdir -p out
go build -o out/client cmd/client/client.go
./out/client

Command-Line Flags and Environment Variables

  • Client Flags:

    • --id: (Optional) Session ID to run to an existing session.

    • --port: (Optional) Port to run the TCP connection with the server.

  • Server Flags:

    • --port: (Optional) Determines the port to run the TCP conection.

Project Structure

  • cert/: Contains TLS/SSL certificates;
  • cmd/client/: Client code to connect and interact with the server;
  • cmd/server/: Server code to handle client requests;
  • pkg: Contains packages that encapsulate different functionalities.
  • proto/: Protocol buffer definitions for gRPC;
  • pb/: Protocol buffer auto-generated files that define data structures and service interfaces for gRPC;
  • out/: Directory to compiled/build binaries;

License

This project is licensed under the MIT License.

About

A remote connection tool made in Go using gRPC to streamline remote access and automate command execution across servers

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors