Skip to content

A powerful, automated VaderShell! command center to connect, control, and operate on all your infrastructure in one place.

License

Notifications You must be signed in to change notification settings

Kritshekhar/VaderShell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Welcome to the Dark Side - VaderShell

Episode I: The Rise of VaderShell

A long time ago, in a galaxy far, far away...

It is a time of technological upheaval. The VaderShell has emerged as a powerful automated command center.
With it, you can connect, control, and dominate all of your infrastructure with one unified force.

The Dark Side awaits... Will you answer the call?


🌌 Features

Centralized SSH Management – Easily connect to all servers in your network.

Automatic IP Resolution – Resolves IPs for servers and VirtualBox VMs.

VM Control Panel – Start, Stop, SSH, and manage VirtualBox instances.

Configurable & Extendable – Define your infrastructure in source.cfg.

Skywalker Mode – The Mother Ship (Admin Server) has full control over the fleet.

SCP File Transfer – Move files to and from datacenter nodes with deep and shallow copy modes.


⚙️ Configuration

Before launching VaderShell, populate source.cfg with your infrastructure details:

# List of servers in the format <hostname>:<user>@<hostname>
SERVERS=(
  "server1:user1@server1"
  "server2:user2@server2"
)

# Datacenter Gateway IP for compute nodes
DATACENTER_GW_IP=10.107.30.1

# Base IP of the datacenter compute nodes (e.g., sequential IPs 10.107.30.100+)
DATACENTER_BASE_IP=10.107.30.100

# SSH key for authentication
DATACENTER_GW_SSH_KEY_PATH="/path/to/your/private_key"

# The Mothership (Admin Server) – Master control node
ADMIN_SERVER="<hostname>:<user>@<user>"

# Username for the mother ship server
MOTHERSHIP_USER="skywalker"

# IP address of the mother ship
MOTHERSHIP_IP="10.218.XXX.XXX"

# Destination directory on the mother ship
MOTHERSHIP_DESTINATION="/path/to/death/star/"

# Username for accessing the data center nodes
DATACENTER_USER="skywalker"

# A compute node in the data center
DUMMY_COMPUTE_NODE="10.XX.XX.XXX"

# Destination directory within the data center
DATACENTER_DESTINATION="/home/<users>/${DATACENTER_USER}/<folder>/"

# Local destination directory for files
LOCAL_DESTINATION="/path/to/local/death/star/"

🛠️ Ussage Guide ⚡

Linux Setup

git clone https://github.com/your-repo/vadershell.git
cd vadershell
# Configure your servers and infrastructure
vim source.cfg
# Run VaderShell
./vadershell.sh

macOS Setup

VaderShell now supports macOS! Follow these steps:

# Clone the repository
git clone https://github.com/your-repo/vadershell.git
cd vadershell

brew install figlet

# Configure your servers and infrastructure
vim source.cfg

# Make the script executable
chmod +x VaderShell.sh

# Run VaderShell
./VaderShell.sh
__     __        _           ____  _          _ _
\ \   / /_ _  __| | ___ _ __/ ___|| |__   ___| | |
 \ \ / / _` |/ _` |/ _ \ '__\___ \| '_ \ / _ \ | |
  \ V / (_| | (_| |  __/ |   ___) | | | |  __/ | |
   \_/ \__,_|\__,_|\___|_|  |____/|_| |_|\___|_|_|

-------------------------------------
Resolving IP addresses for servers...
-------------------------------------
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Available Virtual Machines:
3.  (VM) VM-1
2.  (VM) VM-2
1.  (VM) VM-3
-----------------------------------------------------------
4.  Server: Server-1 (IP: 10.XXX.XXX.XX)
5.  Server: Server-2 (IP: 10.XXX.XXX.XX)
6.  Server: Server-3 (IP: 10.XXX.XXX.XX)
7.  Datacenter Gateway Node
8.  Datacenter Compute nodes
9.  Mother Ship (Admin)
10.  VM Management
11.  SCP File Transfer
12.  Exit
Enter your menu choice [1-12]:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

📁 SCP File Transfer

VaderShell supports multiple file transfer modes via the SCP File Transfer menu option:

Transfer Modes

Mode Direction Description
Deep Copy (Download) Datacenter → Local 3-hop transfer: Compute Node → Gateway → Mothership → Localhost. Files are staged at each hop.
Shallow Copy (Download) Datacenter → Local Direct transfer via SSH ProxyJump (-J) through the gateway. No intermediate staging.
Shallow Copy (Upload) Local → Datacenter Upload local files to the datacenter compute node via ProxyJump. Supports glob patterns (e.g., *.zip) and optional cleanup of local files after successful upload.
Local Server Server → Local Transfer files from a configured local server through the Mothership to localhost.

Deep vs Shallow Copy

Deep Copy (3-hop):
  Compute Node ──scp──▶ Gateway ──scp──▶ Mothership ──scp──▶ Localhost

Shallow Copy (ProxyJump):
  Compute Node ◀──scp -J gateway──▶ Localhost

Deep copy stages files at each intermediate node — useful when direct ProxyJump is not available or when files need to be retained at intermediate nodes.

Shallow copy uses scp -J (ProxyJump) to tunnel through the gateway, transferring files directly between the compute node and localhost in a single command.


🛠️ Upcoming Features ⚡

🚀 🌑 The Force Grows Stronger:

🔹 Support for QEMU & KVM VMs – Expand VaderShell beyond VirtualBox.
🔹 More Comprehensive IP Discovery – Improved detection across networks.
🔹 Automated Backup & Restore – Protect your Empire with scheduled snapshots.
🔹 Live VM Migration – Move VMs across hosts without downtime.
🔹 Dark Mode UI for CLI – Because the Dark Side always looks better.

"Once you start down the VaderShell path, forever will it dominate your destiny."

⚡ Troubleshooting

🛑 No IP Found for VM?

✔️ Ensure the VM is running.
✔️ Check if the network mode is set to Bridged Adapter.
✔️ Use the following command to retrieve the IP:

VBoxManage guestproperty get <VM_NAME> "/VirtualBox/GuestInfo/Net/0/V4/IP"

✔️ If no IP is found, try checking the ARP table: arp -a | grep -i "<VM_MAC_ADDRESS>"

⚡ "Patience, young Padawan. Troubleshooting is the path to mastery."

About

A powerful, automated VaderShell! command center to connect, control, and operate on all your infrastructure in one place.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages