Skip to content

Latest commit

Β 

History

History
76 lines (49 loc) Β· 2.29 KB

File metadata and controls

76 lines (49 loc) Β· 2.29 KB

πŸ” SSH Setup Toolkit

This repository contains three scripts designed to streamline the setup of SSH key-based authentication between a client machine and a host/server. Whether you're provisioning a new VM, configuring remote access, or onboarding a teammate, these scripts make the process repeatable, secure, and foolproof.

πŸ“ Contents

File Description
ssh_client_setup.sh Bash script for Linux/macOS clients to generate and transfer SSH keys
ssh_client_setup.ps1 PowerShell script for Windows clients to do the same
ssh_host_setup.sh Bash script for host/server to install the transferred public key

🧭 Usage Guide

πŸ–₯️ Step 1: Run on the Client Machine

Choose the appropriate script based on your operating system:

  • Linux/macOS

    bash ssh_client_setup.sh
    
  • Windows (PowerShell)

    .\ssh_client_setup.ps1
    

πŸ”§ This Will:

  • Check for required SSH tools (ssh, scp, ssh-keygen)
  • Generate a new SSH key pair (if one doesn’t exist)
  • Prompt for remote username and host IP
  • Transfer the public key to the host as temp_key.pub

πŸ—„οΈ Step 2: Run on the Host Machine

  • After the public key has been transferred, log into the host and run:

    bash ssh_host_setup.sh
    

πŸ”§ This Will:

  • Ensure the .ssh directory exists with correct permissions
  • Append the transferred public key to ~/.ssh/authorized_keys
  • Clean up the temporary key file

πŸ›‘οΈ Best Practices

  • Never share your private key (id_rsa)
  • Use unique keys per client for traceability
  • Set proper permissions: .ssh β†’ 700, authorized_keys β†’ 600
  • Consider using passphrases for keys stored on laptops or shared devices

🧠 Future Enhancements

This repo is designed to be modular and extensible. Future additions may include:

  • Logging setup actions
  • Dry-run mode for safe testing
  • Multi-host provisioning support
  • Windows host-side setup script

πŸ“Œ Author

Michael Brown
Operator mindset. Builder of resilient, scalable systems.
Documented for clarity. Designed for continuity.