Giter Club home page Giter Club logo

easy_ssh's Introduction

GitHub search hit counter GitHub Repo stars GitHub forks

easy_ssh



SSH LOGO

TABLE OF CONTENTS


  1. About this Project

  2. Setup Instructions


ABOUT


    This script was written to make Authenticating with a Remote Host as easy as one command. When you have multiple remote servers that you manage and each one has their own private key, it can become a hassle to manage all of them. Hopefully this script will help make managing those remote hosts and private keys easier.



SETUP


These instructions are just a recommendation of how you COULD set things up. You dont necessarily have to set things up this way for the script to function. This is how I configured the script on my system.


BEFORE DOING ANYTHING, ENSURE YOUR PRIVATE KEYS HAVE THE CORRECT PERMISSIONS. IF YOU DO NOT DO THIS YOU WILL GET AN ERROR SAYING YOUR KEY IS NOT SECURE AND THE KEY WILL BE REJECTED!

chmod 600 /path/to/keys/privatekey_rsa

CLONE THE REPOSITORY

cd ~
git clone https://github.com/ryanc410/easy_ssh.git

ADD THE easy_ssh DIRECTORY TO YOUR SYSTEM'S PATH SO YOU CAN EXECUTE THE SCRIPT FROM ANYWHERE.

export PATH="~/easy_ssh/:$PATH"

CD INTO THE easy_ssh DIRECTORY AND COPY THE ssh-login.sh SCRIPT TO A NAME OF YOUR REMOTE SERVER. THEN MAKE THE SCRIPT EXECUTABLE.

cd easy_ssh
cp ssh-login.sh DOMAIN.sh
chmod +x DOMAIN.sh

OPEN THE COPIED SCRIPT AND CHANGE THE VARIABLES JUST BELOW THE SCRIPT INFORMATION BOX TO THE VALUES THAT MATCH YOUR CONFIGURATION.

#!/usr/bin/env bash
########################################################
# AUTHOR: Ryan C. 
# GITHUB: https://github.com/ryanc410
# DATE: 02-17-2022
# DESCRIPTION: SSH login template for easy Authentication and management of Remote Hosts.
# VERSION: 1.0
########################################################

# Change this value to the IP address of the Remote Host you want to authenticate with.
IP=    <----REMOTE SERVER IP ADDRESS.
# The username to login to the Remote Host.
USER=    <----THE USERNAME TO LOGIN WITH.
# Path to the Private Key that matches the authorized_keys file on the Remote Host. If SSH keys are not configured leave blank.
KEY_FILE=    <----PATH TO WHERE YOU STORE YOUR PRIVATE KEYS. I USUALLY STORE MINE IN ~/.ssh TO MAKE IT EASIER TO REMEMBER.
# If a port other than 22 is configured in the sshd_config file on the Remote Host, enter it here. If not leave blank.
PORT=    <----IF YOU CHANGED THE SSH LISTEN PORT IN THE SSHD_CONFIG FILE PUT THE LISTEN PORT HERE.

EXECUTE THE SCRIPT!

DOMAIN.sh

easy_ssh's People

Contributors

ryanc410 avatar

Watchers

 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.