Skip to content

ruslanlap/Automating-NEWUSERSSH-Key-Exchange

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 

Repository files navigation

Automating-NEWUSERSSH-Key-Exchange

User Setup Script and SSH Connection Guide

What it Does

The User Setup Script automates the process of creating a new user on your Linux system. It includes the following steps:

  • Creates a home directory for the new user.
  • Sets up SSH keys for secure access.
  • Prioritizes security by configuring SSH access correctly.

Why it’s Useful

  • Streamlined User Creation:
    • Ensures a secure foundation for new accounts.
    • Saves you time and effort, allowing you to focus on more critical tasks.
  • Professional-Looking Script:
    • Provides a well-organized and efficient script for your GitHub repository.

How to Use It 🪄✨

Prerequisites:

  • A Linux system with root privileges.
  • An SSH public key (generate one using ssh-keygen if you don’t have it).

Usage Steps:

  1. Place the Script:

    • Save the script in your desired location on the system.
  2. Make it Executable:

    • Open a terminal and run:

      chmod +x autosshconnect.sh
      

    Replace autosshconnect.sh with your actual script name.

  3. Run the Script:

    • Execute the following command with root privileges:

      sudo ./autosshconnect.sh
      
  4. Enter Required Information:

    • Provide the following details:
      • Login name for the new user.
      • Password for the new user (input is hidden).
      • Path to your SSH public key file.
  5. Relax and Let the Script Work:

    • The script will:
      • Create necessary directories and files for the new user.
      • Set up SSH access using your public key.
      • Grant appropriate permissions.
      • Verify successful user creation ✅.

Customization Options

  • Modify Home Directory Path:
    • Adjust the default home directory path within the script (modify the homedir variable).
  • Customize the Welcome Message:
    • Personalize the end-of-script message.
  • Additional Security Measures:
    • Consider adding more checks or security features as needed.

Troubleshooting

  • Error Messages:
    • Check the script output and system logs for clues.
  • Permission Issues:
    • Ensure you have root privileges and correct file permissions.
  • SSH Key Problems:
    • Double-check your key path and format.

Disclaimer ⚠️

  • Use Responsibly:
    • Understand the potential security implications.
  • Review and Customize:
    • Always review and tailor the script before running it on a production system.

Contact

Feel free to ask if you have any further questions or need assistance! 😊

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages