Skip to content

Junner1st/ssh_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSH DEMO

This is a demo, so the user and password are hardcoded in the code. You can find it in ssh_demo.c file.

How to run

Execution

gcc -o main.o main.c ssh_demo.c crypto/rsa.c crypto/diffie_hellman.c -lcrypto -lgmp 

Generate key pair

./main.o genkey <pubfile> <privfile>

For server side

./main.o server <listen_port> <pubfile> <privfile>

For example:

./main.o server 2222 pub.pem priv.pem

For client side

./main.o client <server_ip> <server_port> <pubfile> <username> <password> <command>

For example:

./main.o client 127.0.0.1 2222 pub.pem testuser testpass ls

About

demo an ssh with c

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages