📜  mdem ubuntu ssh key - Shell-Bash (1)

📅  最后修改于: 2023-12-03 15:17:36.154000             🧑  作者: Mango

Mdem Ubuntu SSH Key - Shell/Bash

Mdem Ubuntu SSH Key is a shell/bash script that helps programmers setup and manage SSH key pairs for secure access to remote hosts running Ubuntu operating system. It is a very useful tool for programmers who work with remote servers and need secure access without having to rely on passwords.

Features
  • Generate RSA or EdDSA SSH keys
  • Add public key to authorized_keys file on remote host
  • Remove SSH keys from remote host's authorized_keys file
  • List SSH keys in authorized_keys file on remote host
  • Protect private SSH key with passphrase
  • Connect to remote host without password(prompt for passphrase)
Usage

The usage of Mdem Ubuntu SSH Key is quite simple. Just follow the steps below:

  1. Download the mdem-ubuntu-ssh-key.sh script to your local machine
  2. Open a terminal and navigate to the directory where the script was downloaded
  3. Run the following command to make the script executable:
chmod +x mdem-ubuntu-ssh-key.sh
  1. Now you can run the script by typing the following command:
./mdem-ubuntu-ssh-key.sh
  1. The script will then prompt you for various inputs. Simply follow the prompts to generate or manage your SSH keys.
Code Snippet

Below is a code snippet showing how to generate a new SSH key pair:

#!/bin/bash

# Generate SSH key pair
ssh-keygen -t ed25519 -C "my_email@example.com"

# Prompt for passphrase to protect private key
read -s -p "Enter passphrase for private key: " passphrase

# Add public key to remote host's authorized_keys file
ssh-copy-id user@remote_host
Conclusion

Mdem Ubuntu SSH Key is a very useful tool for programmers who work with remote servers running Ubuntu operating system. It eliminates the need for passwords and provides a more secure way to access remote hosts. It is easy to use and can be customized to suit your needs. So download it today and start managing your SSH keys with ease!