Git Product home page Git Product logo

sshclient's Introduction

SSHClient

A small SSH client written in C#.

Usage

You can grab a copy of SSHClient from the releases page. Alternatively, feel free to compile the solution yourself. Fody/Costura has been used to embed the SSH.NET reference.

Mandatory Arguments

The mandatory arguments consist of an authentication type (either Windows or Local), connection parameters and a module.

  • -a - Authentication Type
    • -a Password - Use password authentication.
    • -a Key - Use key based authentication.

If the authentication type is Password, then you will need to supply the following parameters.

  • -u USERNAME - SSH username
  • -k PASSWORD - Password of SSH user
  • -s SERVER - SSH server to connect to
  • -p PORT - Port on the SSH server to connect to

If the authentication type is Key, then you will need to supply the following parameters.

  • -u USERNAME - SSH username
  • -k KEY - Path to the SSH key
  • -s SERVER - SSH server to connect to
  • -p PORT - Port on the SSH server to connect to

Standard Modules

Standard modules are used to interact against a single MS SQL server.

  • connect - Test to see if the credentials work
  • command -o COMMAND - Execute an arbitrary command
  • download -o PATH - Download a file to C:\\Users\\Username\\Documents\\

Examples

Test connection

SSHClient.exe -a Key -s 18.191.138.12 -p 22 -u ubuntu -k c:\users\skawa\aws.key -m connect
[+] Success! ubuntu can log in to 18.191.138.12:22

Execute commands

SSHClient.exe -a Key -s 18.191.138.12 -p 22 -u ubuntu -k c:\users\skawa\aws.key -m command -o "ps -eaf"

[+] Executing: ps -eaf
UID          PID    PPID  C STIME TTY          TIME CMD
root           1       0  0 Nov10 ?        00:00:12 /sbin/init
root           2       0  0 Nov10 ?        00:00:00 [kthreadd]
root           3       2  0 Nov10 ?        00:00:00 [rcu_gp]
root           4       2  0 Nov10 ?        00:00:00 [rcu_par_gp]
root           5       2  0 Nov10 ?        00:00:48 [kworker/0:0-events]
root           6       2  0 Nov10 ?        00:00:00 [kworker/0:0H-events_highpri]
root           9       2  0 Nov10 ?        00:00:00 [mm_percpu_wq]
root          10       2  0 Nov10 ?        00:00:00 [rcu_tasks_rude_]
<snipped>

Download a file

SSHClient.exe -a Key -s 18.191.138.12 -p 22 -u ubuntu -k c:\users\skawa\aws.key -m download -o /home/ubuntu/file.txt

[+] Downloading: /home/ubuntu/file.txt
[+] File downloaded to: C:\Users\skawa\Documents\file.txt

Roadmap

The below techniques are on the roadmap for future releases

  • Upload files
  • Perhaps add an option to customize the the downloads directory, this is currently C:\\Users\\Username\\Documents\\
  • Authentication based on users session

sshclient's People

Contributors

skahwah avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.